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

Re: Merge, reintegrate, and merge with tree conflicts

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 24 Feb 2013 15:19:11 +0100

On Sun, Feb 24, 2013 at 07:57:14AM -0500, James Hanley wrote:
> I guess I should have read the next response in the thread before replying...

So, to be clear (since you asked off-list):

The following changes to your script prevent the tree conflict with 1.7.

--- enduceTreeConflict.sh.orig Sun Feb 24 15:08:17 2013
+++ enduceTreeConflict.sh Sun Feb 24 15:08:29 2013
@@ -48,7 +48,7 @@
 echo "Rebaselining feature from trunk"
 cd ../../branches/Program_rc1
 svn up
-svn merge ^/trunk/Program .
+svn merge --reintegrate ^/trunk/Program .
 echo "We have a tree conflict!!!"
 #svn commit -m "Rebaselining feature from trunk"
 
@@ -127,7 +127,7 @@
 echo "Perform additional downstream merging"
 cd ../../usr/andy/Program_rc1_main_line
 svn up
-svn merge ^/branches/int/Program_rc1 .
+svn merge --reintegrate ^/branches/int/Program_rc1 .
 echo "We have a tree conflict!!!"
 svn status
 #svn commit -m "Rebaselining usr/andy main line from integration main line"

Remember to use --reintegrate whenever you switch merge direction.
The first time your script uses --reintegrate direction switches from
trunk->branch to branch->trunk. The tree conflict happens when you switch
direction again (to trunk->branch) but don't use --reintegrate.

Having to keep track of which direction the prior merge was using is
rather cumbersome, which is another reason why this "feature" is not
widely advertised in existing documentation (besides the fact that
is was discovered after 1.7 was released).

Subversion 1.8 will fix this issue in a much nicer way.
I've tried running your script with Subversion 1.8-to-be (i.e. trunk).
There is no tree conflict at all, even without the above modifications,
because Subversion 1.8 detects the changes of direction automatically.
Received on 2013-02-24 15:19:56 CET

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.