Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I keep merging repeatedly from a branch to trunk with Subversion merge tracking?

We released version 1.0 and continue developing 2.0 in trunk. We created branches/1.0 for bug fixes related to the released version.

Plan is:

  • 2.0 development continues in trunk/
  • trunk/ contains new features that are not to be merged into branches/1.0, so trunk is not merged into branches/1.0 ever
  • When bugs are found in the released application, fixes are made into branches/1.0. When a fix set is released into production, branches/1.0 is copied to tags/1.0.x, and branches/1.0 is merged into trunk/
  • Idea is that subversion merge tracking should keep track of the changes, so that when we merge 1.0.4 fixes to trunk, 1.0.3 fixes are automatically skipped

Are there any problems with this approach? Will subversion merge tracking keep track of the changes OK? I haven't tried this in practise yet, and most examples do this differently (merging from trunk to branch, which I do not want, as most 2.0 development is not wanted in 1.0 fixes). Does merge-reintegrate fit into this somehow?

like image 493
user449236 Avatar asked Mar 28 '11 14:03

user449236


People also ask

Does svn merge delete the branch?

If you merge a branch into trunk using "svn merge --reintegrate", you are recommended to delete the branch. If you want to do further development in that branch, you should "re-branch", effectively create a new branch with the same name, but rooted at the same revision as you merged the branch into trunk.

Can svn merge be undone?

You can use svn merge to “undo” the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference. (You can do this by specifying --revision 392:391 , or by an equivalent --change -392 .)


1 Answers

Yes, this is exactly what it is designed for. Since the svn:mergeinfo property on trunk is keeping track of which fixes from 1.0 have been merged back, running the merge a second time will not result in it grabbing those revisions again.

Pre-merge-tracking, you would have to keep track of which revisions you merged, and make sure you don't attempt to merge them a second time. Now merging scripts are much cleaner.

like image 149
Mike Miller Avatar answered Sep 24 '22 14:09

Mike Miller