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

SVN branch merge and ancestry

From: Rob Hubbard <Rob.Hubbard_at_celoxica.com>
Date: 2007-01-26 13:55:46 CET

Dear All,

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
     (from /tools/trunk:4087)

      [This branch operation includes the copy of path
           /tools/trunk/sa/tests/source/include
       i.e. sa/tests/source/include exists in the trunk]

  Later, that path is moved in the branch (i.e. renamed via add and delete):

  r4157 D /tools/branches/du/sa/tests/source/include
        A+ /tools/branches/du/sa/tests/source/time_and_control/include
     (from /tools/branches/du/sa/tests/source/include:4156)

  The old path is then effectively replaced by one added
      without history (again in the branch):

  r4159 A /tools/branches/du/sa/tests/source/include

  Yet later, at revision 4497, I wish to merge this back to the trunk.
  In a working copy of the trunk (/tools/trunk), the command

    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
        'sa\tests\source\include'

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?
[The answers could be "yes" and "yes" if this is bug #2144 <http://subversion.tigris.org/issues/show_bug.cgi?id=2144>, in which case the bug is probably fixed at 1.4 (given the dependency)]

I agree that SVN should not attempt to merge this particular directory, but its merge effort should continue. I feel that SVN should issue:

  Skipped: 'sa\tests\source\include'
           (revision 4496 doesn't match existing revision 4497)

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,
Rob.

_____________________________________________________________________
This message has been checked for all known viruses by the MessageLabs Virus Scanning Service, on behalf of Celoxica Ltd.

This email and any files transmitted with it are confidential and
may be legally privileged. It is intended solely for the use of the
individual or entity to whom it is addressed. If you have received
this in error, please contact the sender and delete the material
immediately. Whilst this email has been swept for viruses, you
should carry out your own virus check before opening any
attachment. Celoxica Ltd accepts no liability for any loss or
damage which may be caused by software viruses or interception
or interruption of this email.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jan 26 13:56:57 2007

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.