- 29 Jun 2009 -
Our method for merging branches back to trunk:
- branch> svn merge from trunk [rev_last_merged_from_trunk]:[HEAD]
- branch> (resolve conflicts, deploy, test)
- branch> commit
(at this point, the branch should be exactly what trunk has plus all changes done in the branch) - trunk> svn merge from branch [rev_first_branched_from_trunk]:[HEAD]
For some reason svn still sees a ton of conflicts when doing that last step. In the past I would have to manually go through each file and just copy what was in the branch on top of trunk and then “mark resolved”. However, now there is a faster way: Using at least SVN v1.5 at command line:
svn resolve -R --accept theirs-full *
Thats it! Its a life saver. Or at least a time saver.
(This can be dangerous. Make sure you have resolved all true conflicts in the branch before doing the “resolve all”)
September 23rd, 2009 at 12:16 pm
You want to use the –reintegrate option on merge on the merge back from the branch.
December 7th, 2010 at 1:59 pm
Correction: svn resolve -R –-accept theirs-full *
December 7th, 2010 at 2:03 pm
WP was “helpfully” changing the — to the extended hyphen for me automatically. I added some pre tags to prevent that. Thanks Ivan!
December 29th, 2010 at 3:04 am
Thats it! Its a life saver. Or at least a time saver.
(This can be dangerous. Make sure you have resolved all true conflicts in the branch before doing the “resolve all”)
March 9th, 2011 at 9:42 am
This is very dangerous if you don’t know what you are doing, as you can lose a lot of work, since you haven’t committed your own work yet due to the conflicts.
Check out this tutorial that explains how to resolve conflicts in subversion:
http://www.duchnik.com/tutorials/vc/svn-conflicts