[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Do we need to use svn --reintegrate for branch to branch merge in SVN 1.6.19

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Fri, 19 Oct 2012 11:27:54 -0400

> I have one single doubt on SVN --reintegrate option. If you can clarify this would
> be great.
> There three repositories one of them is trunk other two are branches made
> with svn copy command.
> 1. SVN/Path/to/trunk
> 2. SVN/Path/to/branch/T1
> 3. SVN/Path/to/branch/T2
> Now both T1 and T2 branches work independently for a while and at some
> point
> 1) T2 decides it should bring in all T1 changes to its T2 branch and issues simple
> below cmd * svn co SVN/Path/to/branch/T2 T2localpath * Cd T2localpath * svn
> merge SVN/Path/to/branch/T1 .
> * Svn ci .
> 2) after above step T1 also decides to bring everything from T2 to its T1 branch
> and run below cmds * svn co SVN/Path/to/branch/T1 T1localpath * Cd
> T1localpath * svn merge SVN/Path/to/branch/T2 .
> * Svn ci .
> Now my doubt is in second step of merge back from T2 to T1, is it needed to
> run "-reintegrate" option here and what will happen if we miss it.
> I ask this here because we are on SVN v1.6.19 and I merge only b/w branch to
> branch not to trunk. Currently, I am not using this option and I did not find any
> issue, but I do have more than two branches to merge & reverse merge.

Step 2 above is going to be a problem. This is what is called a cyclic merge. It is going to try to merge back the change you merged in from T1 into T2 back into T1.

afaik A reintegrate can't be done from T2 to T1 since T2 was not branched from T1.

What do you want to finally end up with is the question? If you want all the change from both T1 and T2 in trunk then you should merge from trunk into T1 and T2 and then reintegrate T1 and T2 back into trunk. Then you can create new branches if needed.

If you want to get all the T1 changes into T2 and the T2 into T1 it might be easier to create a patch from T1 and a patch from T2 then cross apply them. Once you start cyclic merges all bets are off. I think for 7.8 they are working on a feature that will support a sync type merge, but I could be wrong.

BTW: all of the above is "my understanding" and I could be somewhat wrong, mostly wrong, or correct. If you can you might want to clone the repository and test your merge scenerios in a non-production sandbox to see if it all works out.

Hth,

BOb
Received on 2012-10-19 17:28:37 CEST

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.