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

2-URL merges incorrectly reverse-merge mergeinfo for merge target?

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 18 May 2010 23:57:21 +0200

Given the subject line, I guess most of you realised that this mail
is intended for Paul and any other merge-tracking nerds on this list :)

Attached is a script that shows a merge which removes mergeinfo for
the merge target for no explicable reason (at least I can't see a
reason for removing it).

The output of the script is below.
The part I don't understand is why mergeinfo for trunk shows up
as reverse-merged in the last diff shown in the output:

  Property changes on: trunk-mergeinfo-reverted/feature2
  ___________________________________________________________________
  Modified: svn:mergeinfo
     Reverse-merged /trunk:r10-13
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The problem is that feature sync merges from trunk to feature2
will not work as intended after this change is committed.
feature2 has already had changes of trunk merged into it in
the past, and with the mergeinfo for trunk removed, all those
changes will be merged again.

See the comments in the script for more information.

This problem can be reproduced with trunk and 1.6.x.
Can someone explain this behaviour?
Is this correct or do we have a bug?

The people who ran into this are helping themselves for now
by restoring the reverted mergeinfo with a --record-only merge
prior to syncing feature2 to trunk again. This is not ideal though...

Thanks,
Stefan

Output:

+ rm -rf trunk-mergeinfo-reverted
+ mkdir -p trunk-mergeinfo-reverted
+ mkdir -p trunk-mergeinfo-reverted/trunk
+ echo alpha
+ > trunk-mergeinfo-reverted/trunk/alpha
+ echo beta
+ > trunk-mergeinfo-reverted/trunk/beta
+ mkdir trunk-mergeinfo-reverted/trunk/gamma
+ echo delta
+ > trunk-mergeinfo-reverted/trunk/gamma/delta
+ mkdir trunk-mergeinfo-reverted/trunk/epsilon
+ echo zeta
+ > trunk-mergeinfo-reverted/trunk/epsilon/zeta
+ svnadmin create /tmp/trunk-mergeinfo-reverted/repos
+ svn import trunk-mergeinfo-reverted/trunk file:////tmp/trunk-mergeinfo-reverted/repos/trunk -m importing project tree
Adding trunk-mergeinfo-reverted/trunk/gamma
Adding trunk-mergeinfo-reverted/trunk/gamma/delta
Adding trunk-mergeinfo-reverted/trunk/alpha
Adding trunk-mergeinfo-reverted/trunk/epsilon
Adding trunk-mergeinfo-reverted/trunk/epsilon/zeta
Adding trunk-mergeinfo-reverted/trunk/beta

Committed revision 1.
+ svn copy --parents file:////tmp/trunk-mergeinfo-reverted/repos/trunk file:////tmp/trunk-mergeinfo-reverted/repos/branches/firstbranch -m creating branch

Committed revision 2.
+ rm -rf trunk-mergeinfo-reverted/trunk
+ svn checkout file:////tmp/trunk-mergeinfo-reverted/repos/trunk trunk-mergeinfo-reverted/trunk
A trunk-mergeinfo-reverted/trunk/gamma
A trunk-mergeinfo-reverted/trunk/gamma/delta
A trunk-mergeinfo-reverted/trunk/alpha
A trunk-mergeinfo-reverted/trunk/epsilon
A trunk-mergeinfo-reverted/trunk/epsilon/zeta
A trunk-mergeinfo-reverted/trunk/beta
Checked out revision 2.
+ svn checkout file:////tmp/trunk-mergeinfo-reverted/repos/trunk trunk-mergeinfo-reverted/trunk2
A trunk-mergeinfo-reverted/trunk2/gamma
A trunk-mergeinfo-reverted/trunk2/gamma/delta
A trunk-mergeinfo-reverted/trunk2/alpha
A trunk-mergeinfo-reverted/trunk2/epsilon
A trunk-mergeinfo-reverted/trunk2/epsilon/zeta
A trunk-mergeinfo-reverted/trunk2/beta
Checked out revision 2.
+ svn checkout file:////tmp/trunk-mergeinfo-reverted/repos/branches/firstbranch trunk-mergeinfo-reverted/branch
A trunk-mergeinfo-reverted/branch/gamma
A trunk-mergeinfo-reverted/branch/gamma/delta
A trunk-mergeinfo-reverted/branch/alpha
A trunk-mergeinfo-reverted/branch/epsilon
A trunk-mergeinfo-reverted/branch/epsilon/zeta
A trunk-mergeinfo-reverted/branch/beta
Checked out revision 2.
+ echo aaa
+ >> trunk-mergeinfo-reverted/branch/alpha
+ svn ci trunk-mergeinfo-reverted/branch -m change branch
Sending trunk-mergeinfo-reverted/branch/alpha
Transmitting file data .
Committed revision 3.
+ svn up trunk-mergeinfo-reverted/trunk
At revision 3.
+ svn merge --reintegrate file:////tmp/trunk-mergeinfo-reverted/repos/branches/firstbranch trunk-mergeinfo-reverted/trunk
--- Merging differences between repository URLs into 'trunk-mergeinfo-reverted/trunk':
U trunk-mergeinfo-reverted/trunk/alpha
--- Recording mergeinfo for merge between repository URLs into 'trunk-mergeinfo-reverted/trunk':
 U trunk-mergeinfo-reverted/trunk
+ svn ci trunk-mergeinfo-reverted/trunk -m reintegrated branch
Sending trunk-mergeinfo-reverted/trunk
Sending trunk-mergeinfo-reverted/trunk/alpha
Transmitting file data .
Committed revision 4.
+ svn rm file:////tmp/trunk-mergeinfo-reverted/repos/branches/firstbranch -m remove branch

Committed revision 5.
+ rm -rf trunk-mergeinfo-reverted/branch
+ svn cp file:////tmp/trunk-mergeinfo-reverted/repos/trunk file:////tmp/trunk-mergeinfo-reverted/repos/branches/feature1 -m create feature1 branch

Committed revision 6.
+ svn co file:////tmp/trunk-mergeinfo-reverted/repos/branches/feature1 trunk-mergeinfo-reverted/feature1
A trunk-mergeinfo-reverted/feature1/gamma
A trunk-mergeinfo-reverted/feature1/gamma/delta
A trunk-mergeinfo-reverted/feature1/alpha
A trunk-mergeinfo-reverted/feature1/epsilon
A trunk-mergeinfo-reverted/feature1/epsilon/zeta
A trunk-mergeinfo-reverted/feature1/beta
 U trunk-mergeinfo-reverted/feature1
Checked out revision 6.
+ echo bbb
+ >> trunk-mergeinfo-reverted/feature1/beta
+ svn ci trunk-mergeinfo-reverted/feature1 -m work on feature1
Sending trunk-mergeinfo-reverted/feature1/beta
Transmitting file data .
Committed revision 7.
+ echo zzz
+ >> trunk-mergeinfo-reverted/trunk/epsilon/zeta
+ svn ci trunk-mergeinfo-reverted/trunk -m some work on trunk
Sending trunk-mergeinfo-reverted/trunk/epsilon/zeta
Transmitting file data .
Committed revision 8.
+ svn up trunk-mergeinfo-reverted/feature1
At revision 8.
+ svn merge file:////tmp/trunk-mergeinfo-reverted/repos/trunk trunk-mergeinfo-reverted/feature1
--- Merging r6 through r8 into 'trunk-mergeinfo-reverted/feature1':
U trunk-mergeinfo-reverted/feature1/epsilon/zeta
--- Recording mergeinfo for merge of r6 through r8 into 'trunk-mergeinfo-reverted/feature1':
 U trunk-mergeinfo-reverted/feature1
+ svn ci trunk-mergeinfo-reverted/feature1 -m sync with trunk
Sending trunk-mergeinfo-reverted/feature1
Sending trunk-mergeinfo-reverted/feature1/epsilon/zeta
Transmitting file data .
Committed revision 9.
+ svn cp file:////tmp/trunk-mergeinfo-reverted/repos/trunk file:////tmp/trunk-mergeinfo-reverted/repos/branches/feature2 -m create feature2 branch

Committed revision 10.
+ svn co file:////tmp/trunk-mergeinfo-reverted/repos/branches/feature2 trunk-mergeinfo-reverted/feature2
A trunk-mergeinfo-reverted/feature2/gamma
A trunk-mergeinfo-reverted/feature2/gamma/delta
A trunk-mergeinfo-reverted/feature2/alpha
A trunk-mergeinfo-reverted/feature2/epsilon
A trunk-mergeinfo-reverted/feature2/epsilon/zeta
A trunk-mergeinfo-reverted/feature2/beta
 U trunk-mergeinfo-reverted/feature2
Checked out revision 10.
+ echo aaaa
+ >> trunk-mergeinfo-reverted/feature2/alpha
+ svn ci trunk-mergeinfo-reverted/feature2 -m work on feature2
Sending trunk-mergeinfo-reverted/feature2/alpha
Transmitting file data .
Committed revision 11.
+ svn up trunk-mergeinfo-reverted/trunk
At revision 11.
+ svn merge --reintegrate file:////tmp/trunk-mergeinfo-reverted/repos/branches/feature2 trunk-mergeinfo-reverted/trunk
--- Merging differences between repository URLs into 'trunk-mergeinfo-reverted/trunk':
U trunk-mergeinfo-reverted/trunk/alpha
--- Recording mergeinfo for merge between repository URLs into 'trunk-mergeinfo-reverted/trunk':
 U trunk-mergeinfo-reverted/trunk
+ svn ci trunk-mergeinfo-reverted/trunk -m reintegrate bugfix from feature2 branch
Sending trunk-mergeinfo-reverted/trunk
Sending trunk-mergeinfo-reverted/trunk/alpha
Transmitting file data .
Committed revision 12.
+ svn up trunk-mergeinfo-reverted/feature2
At revision 12.
+ svnlook youngest trunk-mergeinfo-reverted/repos
+ svn merge -c 12 --record-only file:////tmp/trunk-mergeinfo-reverted/repos/trunk trunk-mergeinfo-reverted/feature2
--- Merging r12 into 'trunk-mergeinfo-reverted/feature2':
 U trunk-mergeinfo-reverted/feature2
--- Recording mergeinfo for merge of r12 into 'trunk-mergeinfo-reverted/feature2':
 U trunk-mergeinfo-reverted/feature2
+ svn ci trunk-mergeinfo-reverted/feature2 -m block reintegration revision
Sending trunk-mergeinfo-reverted/feature2

Committed revision 13.
+ svn up trunk-mergeinfo-reverted/feature2
At revision 13.
+ svn merge file:////tmp/trunk-mergeinfo-reverted/repos/trunk trunk-mergeinfo-reverted/feature2
--- Recording mergeinfo for merge of r10 through r13 into 'trunk-mergeinfo-reverted/feature2':
 U trunk-mergeinfo-reverted/feature2
+ svn ci trunk-mergeinfo-reverted/feature2 -m sync with trunk
Sending trunk-mergeinfo-reverted/feature2

Committed revision 14.
+ svn up trunk-mergeinfo-reverted/feature1
At revision 14.
+ svn merge file:////tmp/trunk-mergeinfo-reverted/repos/trunk trunk-mergeinfo-reverted/feature1
--- Merging r9 through r14 into 'trunk-mergeinfo-reverted/feature1':
U trunk-mergeinfo-reverted/feature1/alpha
 G trunk-mergeinfo-reverted/feature1
--- Recording mergeinfo for merge of r9 through r14 into 'trunk-mergeinfo-reverted/feature1':
 G trunk-mergeinfo-reverted/feature1
+ svn ci trunk-mergeinfo-reverted/feature1 -m sync with trunk
Sending trunk-mergeinfo-reverted/feature1
Sending trunk-mergeinfo-reverted/feature1/alpha
Transmitting file data .
Committed revision 15.
+ svnlook youngest trunk-mergeinfo-reverted/repos
+ rebase_rev=15
+ svn up trunk-mergeinfo-reverted/feature2
At revision 15.
+ svn merge file:////tmp/trunk-mergeinfo-reverted/repos/trunk_at_15 file:////tmp/trunk-mergeinfo-reverted/repos/branches/feature1 trunk-mergeinfo-reverted/feature2
--- Merging differences between repository URLs into 'trunk-mergeinfo-reverted/feature2':
U trunk-mergeinfo-reverted/feature2/beta
 G trunk-mergeinfo-reverted/feature2
--- Recording mergeinfo for merge between repository URLs into 'trunk-mergeinfo-reverted/feature2':
 G trunk-mergeinfo-reverted/feature2
 G trunk-mergeinfo-reverted/feature2
+ svn diff trunk-mergeinfo-reverted/feature2

Property changes on: trunk-mergeinfo-reverted/feature2
___________________________________________________________________
Modified: svn:mergeinfo
   Reverse-merged /trunk:r10-13
   Merged /branches/feature1:r6-15
Index: trunk-mergeinfo-reverted/feature2/beta
===================================================================
--- trunk-mergeinfo-reverted/feature2/beta (revision 15)
+++ trunk-mergeinfo-reverted/feature2/beta (working copy)
@@ -1 +1,2 @@
 beta
+bbb
+ svn pg -v -R svn:mergeinfo trunk-mergeinfo-reverted/feature2
Properties on 'trunk-mergeinfo-reverted/feature2':
  svn:mergeinfo
    /branches/feature1:6-15
    /branches/firstbranch:2-3

Received on 2010-05-18 23:57:55 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.