Change third party code in subversion
I am using a script for my home page, but I would like to localize it. Also, the CSS is using images from a special folder that doesn't fit my folder hierarchy. Since I don't want to use these paths and settings, I will have to change the original sources.
Currently my repository looks like this:
- / 3rdParty
- / CompanyA
- / CompanyAProduct1
- / v1_0
- / v1_1
- / MyProductA
- branches tags
- / trunk
- /import
- /export
- /a source
Via svn: externals I am mapping whatever I need (lib, dll or code) in the import folder. Now I want to change the files in the import folder, but this will also change the original sources (as far as I know). What's the best solution has a modified version in my import folder, but the original sources remain intact? Should I make a branch of third party code? But then I have to update the original sources for each new version.
a source to share
Read the section "Provider Branches" of the Redbook version (Version Control with Subversion):
http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html
Procedure for managing a branch of a shared vendor Vendor branch
management typically works like this: First, you create a top-level directory (such as / vendor) to hold the vendor branches. Then you import the third party code into a subdirectory of that top level directory. Then you copy that subdirectory into your main development branch (e.g. / trunk) in the appropriate location. You always make your local changes to the main development branch. With each new version of the code you track, you push it to the vendor branch and merge the changes into / trunk, resolving any conflicts between local changes and upstream changes .... (See the rest of the branch head of the redbook chapter for specific commands and a complete example.)
Basically you check the vendor code separately from your project, flag the version and then copy it into your project. This will allow you to make your local changes while maintaining a pointer to the original version.
The advantage is that when a vendor releases a new version of their product, the redbook describes how to include the new version in your project so that the same local changes that were made to the original version are applied to the new version.This of course sounds theoretically, but in practice there may be several errors:
But things are not that simple, and in fact it is quite common for source files to move between software versions. This complicates the process of ensuring that our modifications are still valid for the new version of the code, and things can quickly deteriorate in a situation where we have to manually re-create our settings in the new version.
a source to share