5

I know there is the --reintegrate option in Subversion (SVN) 1.6 to merge a feature branch back to the trunk.

My workflow is a little more complex:

We have feature branches - we merge trunk to them often. But we don't put them back to trunk right away. Instead we create a release branch off the trunk, and merge feature branches to release branch. At this point we get a lot of tree conflicts (since lot of changes exist both in feature branch and the trunk).

Option --reintegrate must help in this scenario, but it looks like --reintegrate doesn't work when merging to the branch other than trunk. Is that true?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
tevch
  • 625
  • 6
  • 14
  • 1
    So looks like no reintegrate required: Was able to solve my problem after reading this: http://designbygravity.wordpress.com/2009/10/19/what-mother-never-told-you-about-svn-branching-and-merging/ – tevch Oct 11 '11 at 23:24

1 Answers1

4

It's news to me that you can't use the --reintegrate option on any branch besides trunk. Subversion doesn't have any standard on naming or the placement of branches, so there's no way that trunk is special. To Subversion, branches, trunk, and tags are mere directories. These directories are only special to us because we said so.

The --reintegrate option has to do with the fact that if I merge from branch A to branch B, and then try to merge back from branch B to branch A, I might be attempting to merge stuff back to branch A that was initially in branch A. The --reintegrate option lets Subversion know that I am reversing the direction of my merge, and to not consider stuff in branch B that was really the result of merging from branch A.

Reintegration is an issue in any version control system that actually tracks merged changes. In any case, there's no reason why --reintegrate must involve a branch called trunk. Otherwise, there's no real need for the option. All Subversion has to do is see you're merging into a branch called trunk and realize it's probably a reintegration.

David W.
  • 105,218
  • 39
  • 216
  • 337
  • 1
    Yes, i was under same impression - reintegrate couldn't be restricted, but i never saw people reintegrate to other than trunk, and when i do reintegrate to the branch i get this: svn: '/svn/!svn/bc/364751//releases/' path not found – tevch Sep 09 '11 at 17:17
  • So looks like reintegrate is not what i need. I need 2 feature branches merged to release branch(copy of trunk). So how do i let svn know to not consider stuff in branch R that was really the result of merging from branch T and get rid of all these tree conflicts? – tevch Sep 09 '11 at 17:31
  • So you go from Trunk->Feature_branch, then Trunk->Release_branch. Changes in Trunk are merged to Feature_branch. You also commit changes to Feature_branch. Finally, you want to merge Feature_branch to Release_branch. I'm not 100% sure that will work since the two branches are not directly related. Svn's merging is still a bit weak. You might be better off using the `--ignore-ancestory`. Subscribe to the [Subversion list](http://subversion.apache.org/mailing-lists.html) and ask there. That list specializes in Subversion issues and probably has more expertise than available here. – David W. Sep 09 '11 at 19:09