Using SVN merge tracking effectively

Svn server was recently updated to version 1.5. The life-changing feature of svn 1.5 merge-tracking, which means that the server will help tracking files that need to be merged between branches, so this will be less of a pain. Also, the server will be able to show exactly from where a branch was branched or merged.

The Google code blog published a very good article on how to do this, since they are also upgrading the version of svn used by their code hosting service. Here a small sample of how a merge should be properly done (sorry, this is just for CLI users, but you can replicate everything on subversion).


Make a branch for your experimental work:
$ cd trunk-working-copy
$ svn cp trunkURL branchURL
$ svn switch branchURL

Work on the branch for a while:
# ...edit files
$ svn commit
# ...edit files
$ svn commit

Sync your branch with the trunk, so it doesn't fall behind:
$ svn merge trunkURL
--- Merging r3452 through r3580 into '.':
U button.c
U integer.c
...
$ svn commit

Repeat the prior two steps until you're done coding.

Merge your branch back into the trunk:
$ svn switch trunkURL
$ svn merge --reintegrate branchURL
--- Merging differences between repository URLs into '.':
U button.c
U integer.c
...
$ svn commit

Similar Posts:

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.