changeset 8748:f325574dad1a

merge: combine a copy and move case
author Matt Mackall <mpm@selenic.com>
date Mon, 08 Jun 2009 18:14:44 -0500
parents 9b3fd8ab3558
children 69caf50da4a0
files mercurial/merge.py tests/test-issue672.out tests/test-rename-merge2.out
diffstat 3 files changed, 7 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Jun 08 18:14:44 2009 -0500
+++ b/mercurial/merge.py	Mon Jun 08 18:14:44 2009 -0500
@@ -199,11 +199,8 @@
             if f2 not in m2: # directory rename
                 act("remote renamed directory to " + f2, "d",
                     f, None, f2, m1.flags(f))
-            elif f2 in m1: # case 2 A,B/B/B
-                act("local copied to " + f2, "m",
-                    f, f2, f, fmerge(f, f2, f2), False)
-            else: # case 4,21 A/B/B
-                act("local moved to " + f2, "m",
+            else: # case 2 A,B/B/B or case 4,21 A/B/B
+                act("local copied/moved to " + f2, "m",
                     f, f2, f, fmerge(f, f2, f2), False)
         elif n[20:] == "a": # added, no remote
             act("remote deleted", "f", f)
--- a/tests/test-issue672.out	Mon Jun 08 18:14:44 2009 -0500
+++ b/tests/test-issue672.out	Mon Jun 08 18:14:44 2009 -0500
@@ -29,7 +29,7 @@
   all copies found (* = to merge, ! = divergent):
    1a -> 1 *
   checking for directory renames
- 1a: local moved to 1 -> m
+ 1a: local copied/moved to 1 -> m
 preserving 1a for resolve of 1a
 picked tool 'internal:merge' for 1a (binary False symlink False)
 merging 1a and 1 to 1a
--- a/tests/test-rename-merge2.out	Mon Jun 08 18:14:44 2009 -0500
+++ b/tests/test-rename-merge2.out	Mon Jun 08 18:14:44 2009 -0500
@@ -44,7 +44,7 @@
    b -> a *
   checking for directory renames
  a: remote is newer -> g
- b: local copied to a -> m
+ b: local copied/moved to a -> m
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
@@ -109,7 +109,7 @@
   all copies found (* = to merge, ! = divergent):
    b -> a *
   checking for directory renames
- b: local moved to a -> m
+ b: local copied/moved to a -> m
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
@@ -546,7 +546,7 @@
   all copies found (* = to merge, ! = divergent):
    b -> a *
   checking for directory renames
- b: local moved to a -> m
+ b: local copied/moved to a -> m
  rev: versions differ -> m
 preserving b for resolve of b
 preserving rev for resolve of rev
@@ -578,7 +578,7 @@
   all copies found (* = to merge, ! = divergent):
    b -> a *
   checking for directory renames
- b: local moved to a -> m
+ b: local copied/moved to a -> m
  rev: versions differ -> m
  c: remote created -> g
 preserving b for resolve of b