diff mercurial/merge.py @ 3280:ae85272b59a4

merge: copy fixes and tests Fix up "already seen" logic Fix merge action in remote copy case Add status message Add lots of merge+copy/move test cases
author Matt Mackall <mpm@selenic.com>
date Fri, 06 Oct 2006 16:55:11 -0500
parents c93ce7f10f85
children 764688cf51e5
line wrap: on
line diff
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -248,11 +248,11 @@ def manifestmerge(ui, m1, m2, ma, copy, 
             continue
         if f in copy:
             f2 = copy[f]
-            if f2 in ma or f2 in m1: # already seen
+            if f2 not in m2: # already seen
                 continue
             # rename case 1, A/A,B/A
             act("remote copied",
-                f, "c", f2, f, m1[f2], m2[f], fmerge(f2, f, f2), False)
+                f2, "c", f, f, m1[f2], m2[f], fmerge(f2, f, f2), False)
         elif f in ma:
             if overwrite or backwards:
                 act("recreating", f, "g", m2.execf(f), n)
@@ -285,6 +285,7 @@ def applyupdates(repo, action, xp1, xp2)
             removed +=1
         elif m == "c": # copy
             f2, fd, my, other, flag, move = a[2:]
+            repo.ui.status(_("merging %s and %s to %s\n") % (f, f2, fd))
             if filemerge(repo, f, f2, fd, my, other, xp1, xp2, move):
                 unresolved += 1
             util.set_exec(repo.wjoin(fd), flag)