merge: simplify some update logic
authorMatt Mackall <mpm@selenic.com>
Tue, 22 Aug 2006 16:47:27 -0500
changeset 2972 ad558f297eb1
parent 2971 33dcf03ef45f
child 2973 a31557193f3c
merge: simplify some update logic
mercurial/merge.py
--- a/mercurial/merge.py	Tue Aug 22 16:23:29 2006 -0500
+++ b/mercurial/merge.py	Tue Aug 22 16:47:27 2006 -0500
@@ -155,7 +155,7 @@
             if n != m2[f]:
                 a = ma.get(f, nullid)
                 # are both different from the ancestor?
-                if n != a and m2[f] != a:
+                if not overwrite and n != a and m2[f] != a:
                     repo.ui.debug(_(" %s versions differ, resolve\n") % f)
                     merge[f] = (fmerge(f, mw, m2, ma), m1.get(f, nullid), m2[f])
                     queued = 1
@@ -233,11 +233,6 @@
 
     ### apply phase
 
-    if overwrite:
-        for f in merge:
-            get[f] = merge[f][:2]
-        merge = {}
-
     if linear_path or overwrite:
         # we don't need to do any magic, just jump to the new rev
         p1, p2 = p2, nullid