SVN branch merge and ancestry
From: Rob Hubbard <Rob.Hubbard_at_celoxica.com>
Date: 2007-01-26 13:55:46 CET
I am using SVN 1.2.3, which is admittedly quite an old version; I will probably upgrade at 1.5, or when the improved merge and/or rename support is available. However, SVN was a truly wonderful tool, even back at 1.2.3; this has been more than sufficiently good for my team's needs.
I'm not sure whether the problem I have is due to a bug in SVN; probably not.
I have performed many branches and merges in the past. I have just been bitten by a problem that I've not seen before.
Following this, I've referred to the manual, and done some experimentation, to try to understand what the problem is.
I have tried to put together enough details of what has happened.
Here's a sequence of revisions and paths and the events that I think are significant. [I have abbreviated some of the paths; the real paths are not really so cryptic.]
The feature development started with a branch:
r4127 A+ /tools/branches/du
[This branch operation includes the copy of path
Later, that path is moved in the branch (i.e. renamed via add and delete):
r4157 D /tools/branches/du/sa/tests/source/include
The old path is then effectively replaced by one added
r4159 A /tools/branches/du/sa/tests/source/include
Yet later, at revision 4497, I wish to merge this back to the trunk.
svn merge -r4127:4496 svn://repos/tools/branches/du
[and I usually redirect the output to a file] results in the error
svn: Revision 4496 doesn't match existing revision 4497 in
I understand why this happens: SVN is trying to merge the changes in /tools/branches/du/sa/tests/source/include (which was effectively replaced) into /tools/trunk/sa/tests/source/include, but these paths are not related, i.e. the former is not an 'ancestor' of the latter.
My problem is that the error *stops the merge*.
Question (1): Why? Is this a bug? Has it been fixed in later versions?
I agree that SVN should not attempt to merge this particular directory, but its merge effort should continue. I feel that SVN should issue:
I could then handle this skip by, e.g., an 'svn cp' or 'svn merge --ignore-ancestry' command on just that subdirectory.
[So, if it's fixed, is this what it does now?]
From the manual, I note the switch --ignore-ancestry, which seems to provide me with a workaround. However, the documentation is a bit vague on this matter: "Add the --ignore-ancestry option to your merge command, and it will behave just like svn diff."
Question (2): What does that mean? Does it mean just that the ancestry mismatches will be ignored? Or could the results of merges on individual files differ depending upon whether the command will --ignore-ancestry or --notice-ancestry? Are there any other material differences?
Thanks very much in advance,
This email and any files transmitted with it are confidential and
This is an archived mail posted to the Subversion Users mailing list.