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

Handling of move/rename on merge

From: Tor Ringstad <tor.ringstad_at_tandberg.net>
Date: 2004-07-02 19:36:18 CEST

Consider the following two scenarios involving merging from a branch A
into a branch B, when some file has been modified on one branch and
renamed/moved on the other.

1) File was modified on A and moved/renamed on B

       (copy) (mod)
        r12 r14
foo.c ---x--------x---> branch A
         |
         \----x-------> branch B
             r13
             (mv)

A merge of r12:r14 from A to B just gives me "Skipped missing target".

I would have expected subversion to merge the changes of the file on
branch A into the "same" file on branch B, no matter what the file was
named or where it was located on B.

Am I doing something wrong, doesn't subversion support this behaviour,
or do I simply have strange expectations?

2) File was moved/renamed on A and modified on B

       (copy) (mv)
        r12 r14
foo.c ---x--------x---> branch A
         |
         \----x-------> branch B
             r13
            (mod)

A merge of r12:r14 from A to B gives something similar to this;

  % svn merge -r12:14 http://.../branchA
  A foo_with_new_name.c
  D foo.c

As expected, the rename is merged, and foo.c changes name to
foo_with_new_name.c on B. What surprises me this time, is that
foo_with_new_name.c from A completely replaces foo.c from B, i.e. the
modification in r13 is lost.

- Tor Ringstad -

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 2 19:45:39 2004

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.