RE: mergeinfo and reintegrate
From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Thu, 1 Apr 2010 15:59:19 -0400
> Svn help mergeinfo does not reference --reintegrate at all. Are you
Certainly it does.
When you do...
~/MyProjectsTrunk/ $ svn merge ^/branch/MyFeature
svn will look at the trunk and find all merge info to see what revs from branch have already been brought in. Lets say it's none... so it will do a diff from the rev where your branch started to HEAD and apply that diff to trunk.
However, if you do a:
~/MyProjectsTrunk/ $ svn merge --reintegreate ^/branch/MyFeature
svn will do a 2-URL merge doing a diff between trunk@HEAD and MyFeature@HEAD (I am pretty sure see http://blogs.open.collab.net/svn/2008/07/subversion-merg.html for a full explaination).
So, when you do a mergeinfo it is assuming you are doing a single URL merge, the first command above.
At least, as far as I understand it that is what is going on.
> Also the help for reintegrate says that the only difference is that it
Right... because when you do svn merge ^/trunk in your branch for example, it is bringing in each revision from trunk that hasn't been merged yet. But, when you do a reintegrate from a branch to trunk it is doing a 2-URL merge which basically diffs the head of trunk with the head of branch and applies it to trunk. (This is the same thing you would have done manually prior to svn 1.5.)
> you saying that if you have done a complete merge out, you can skip the
Sort answer is YES. Long answer is: If you have a feature branch... and you merge from trunk, in order to merge the changes made in the branch that you want to apply to trunk you do the reintegrate. As I said above since this is a 2-URL merge you must have all of trunk merged into the feature branch. (BTW: This is just the use case for a feature branch. You would do it differently if you were doing perhaps a release branch.)
> Actually, now that I have written and reread this, I think I answered my
It is documented... but reading the blog entry I linked to above gives you a lot more information.
BOb
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.