What you are looking for is called SVN Vendor Industries .
Basically, you save a separate branch in your repository only for the basic versions of the project, and then merge the changes between the versions of the project into your trunk.
For example:
svn import ./projectdir svn://repourl/project/branches/vendor/current/ -m 'Home for current core version of source code' svn copy svn://repourl/project/branches/vendor/current/ svn://repourl/project/branches/vendor/1.0.0/ -m '1.0.0 tag of core source code' svn copy svn://repourl/project/branches/vendor/current/ svn://repourl/project/trunk/ -m 'Initial trunk commit of 1.0.0'
Now we have:
- The "current" branch that has the latest version of the main code that you use.
- The "1.0.0" tag of the main code (you should not introduce any new changes to this tag)
- Your trunk, which now has 1.0.0 core code.
Now, let's say you worked on the project for several months and made a bunch of updates for the project in your trunk. The kernel version 1.1.0 has been released, and you want to use some new functions without losing your work.
You can use your provider's branches for this.
svn co svn://repourl/project/branches/vendor/current/ ./project
* extract version 1.1.0 on top of a working copy *
svn status | grep -E '^?' | xargs svn add
Now what do we have? We have:
- Tag for version 1.0.0 of the project
- Tag for version 1.1.0 of the project
- A string with a modified version of the project that we want to update.
So what do we need to do? Simple merge.
svn co svn://repourl/project/trunk ./project svn merge svn://repourl/branches/vendor/1.0.0 svn://repourl/branches/vendor/1.1.0 ./project
What you say that SVN does in the line above is essentially: "Find the differences between project version 1.0.0 and project 1.1.0, and then combine these differences into my modified version of the project."
For most files, merging will be smooth and painless. For others that you and the community have changed at the same time, SVN will complain about conflicts. If you have not made huge changes really , these conflicts should not be difficult to merge. I recommend choosing " p " for "Delay conflict resolution" and resolve them using TortoiseSVN. It is much, much easier to do so.
Once your conflicts are resolved, continue testing and test the application. If everything works as expected, go ahead and svn commit your working copy.
... and you're done!
Some more reference materials on the topic: