Joakim Tjernlund reported a use case where unexpected self-referential
mergeionfo is created: http://svn.haxx.se/dev/archive-2010-05/0398.shtml.
His example involved externals and a shallow (empty) WC merge target. These are
all red herrings however, the problem is this: Cyclic --record-only merges
create self-referential mergeinfo.
For example:
# Given a simple repository with a recently made branch (in r6):
>svn log -v -r 1:HEAD ^^/
------------------------------------------------------------------------
r1 | jrandom | 2010-05-26 11:23:53 -0400 (Wed, 26 May 2010) | 1 line
Changed paths:
A /A
A /A/B
A /A/B/E
A /A/B/E/alpha
A /A/B/E/beta
A /A/B/F
A /A/B/lambda
A /A/C
A /A/D
A /A/D/G
A /A/D/G/pi
A /A/D/G/rho
A /A/D/G/tau
A /A/D/H
A /A/D/H/chi
A /A/D/H/omega
A /A/D/H/psi
A /A/D/gamma
A /A/mu
A /iota
Log message for revision 1.
------------------------------------------------------------------------
r2 | jrandom | 2010-05-26 11:23:55 -0400 (Wed, 26 May 2010) | 1 line
Changed paths:
M /A/D/H/psi
log msg
------------------------------------------------------------------------
r3 | jrandom | 2010-05-26 11:23:56 -0400 (Wed, 26 May 2010) | 1 line
Changed paths:
M /A/D/G/rho
log msg
------------------------------------------------------------------------
r4 | jrandom | 2010-05-26 11:23:56 -0400 (Wed, 26 May 2010) | 1 line
Changed paths:
M /A/B/E/beta
log msg
------------------------------------------------------------------------
r5 | jrandom | 2010-05-26 11:23:57 -0400 (Wed, 26 May 2010) | 1 line
Changed paths:
M /A/D/H/omega
log msg
------------------------------------------------------------------------
r6 | pburba | 2010-05-26 11:24:33 -0400 (Wed, 26 May 2010) | 1 line
Changed paths:
A /A_COPY_2 (from /A:5)
# Do a cyclic merge and the mergeinfo is as expected:
------------------------------------------------------------------------
>svn merge ^^/A_COPY_2 A
--- Recording mergeinfo for merge of r6 into 'A':
U A
>svn diff
Property changes on: A
___________________________________________________________________
Added: svn:mergeinfo
Merged /A_COPY_2:r6
# Revert and redo the same merge, but this time with the --record-only
# option and the target picks up mergeinfo referring to its own
# history up to the branch point (i.e. /A:r2-5).
>svn revert -R .
Reverted 'A'
>svn merge ^^/A_COPY_2 A --record-only
--- Recording mergeinfo for merge of r2 through r5 into 'A':
U A
--- Recording mergeinfo for merge of r6 into 'A':
G A
>svn diff
Property changes on: A
___________________________________________________________________
Added: svn:mergeinfo
Merged /A:r2-5
Merged /A_COPY_2:r6