When doing a merge between two unrelated trees B1 and B2 that look like this:
/
B1/
A/
test
B2/
and where B1 and B1/A were both created at the same time. You'll receive a tree conflict because the the creation of A
will not be merged:
[[[
--- Merging r2 into 'wc/B2':
C wc/B2/A
--- Recording mergeinfo for merge of r2 into 'wc/B2':
U wc/B2
Summary of conflicts:
Tree conflicts: 1
]]]
The following script reproduces the problem:
[[[
svnadmin create repo
svn co file://`pwd`/repo wc
svn mkdir --parents wc/B1/A wc/B2
svn commit wc -m m
echo test > wc/B1/A/test
svn add wc/B1/A/test
svn commit wc -m m
svn merge -r0:HEAD wc/B1 wc/B2
]]]
Splitting the creation of B1 and A into separate revisions makes the merge complete successfully. E.G. simply adding the
following additional mkdir/commit after the creation of the repo to the above script:
[[[
svn mkdir wc/B1
svn commit wc -m m
]]]
The problem here is that r1 is being skipped since svn_repos_node_location_segments() is finding no previous location
for B1. With no previous location the range_start is changed to 1 from the specified 0. Making the change in r1 be
skipped.
Without r1 you get a tree conflict since A is never created.
This report comes out of the discussion resulting from this thread:
http://mail-archives.apache.org/mod_mbox/subversion-dev/201301.mbox/%3C5CB8E36D-1657-4E33-921F-
0EA7F6F4469E%40versata.com%3E
http://mail-archives.apache.org/mod_mbox/subversion-dev/201301.mbox/%3C5CB8E36D-1657-4E33-921F-0EA7F6F4469E%40versata.com%3E