subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Archer <>
Subject RE: mergeinfo and reintegrate
Date Thu, 01 Apr 2010 19:59:19 GMT
> Svn help mergeinfo does not reference --reintegrate at all. Are you
> saying that a merge with the
> -reintegrate option may skip some items that mergeinfo lists as
> eligible?

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 for a full explaination).

So, when you do a mergeinfo it is assuming you are doing a single URL merge, the first command

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
> treats the merge as a lump sum, not as a sequence of mini merges. Are

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
> individual merge ins and just do one big reintegrate? If so, Is doing a
> complete merge out first mandatory? (I would think so). Can this model
> handle files that were deleted and re-added?

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
> own question. Using reintegrate is orthogonal to using mergeinfo. You
> use mergeinfo to pick up changes that have been made in a release branch
> that need to be merged to trunk, and you use -reintegrate to merge a
> project branch back to its baseline.
> I feel like I must have missed that section in the book. Is this not
> documented?

It is documented... but reading the blog entry I linked to above gives you a lot more information.


View raw message