diff mercurial/merge.py @ 8734:60fa3371aa75

merge: pretend ancestor is local to simplify backwards and overwrite
author Matt Mackall <mpm@selenic.com>
date Mon, 08 Jun 2009 18:14:44 -0500
parents f8be48c6b08c
children ff8519c437c6
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
@@ -133,6 +133,10 @@
     m2 = p2.manifest()
     ma = pa.manifest()
     backwards = (pa == p2)
+
+    if backwards or overwrite:
+        ma = m1
+
     action = []
     copy, copied, diverge = {}, {}, {}
 
@@ -209,7 +213,7 @@
             else: # case 4,21 A/B/B
                 act("local moved to " + f2, "m",
                     f, f2, f, fmerge(f, f2, f2), False)
-        elif f in ma:
+        elif f in ma and not n[20:]:
             if n != ma[f] and not overwrite:
                 if repo.ui.prompt(
                     _(" local changed %s which remote deleted\n"