changeset 3731:b4af5f92e04b

merge: move check for empty ancestor into findcopies
author Matt Mackall <mpm@selenic.com>
date Thu, 30 Nov 2006 17:36:33 -0600
parents d377f8d25662
children ffe9fef84801
files mercurial/merge.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Thu Nov 30 17:36:33 2006 -0600
+++ b/mercurial/merge.py	Thu Nov 30 17:36:33 2006 -0600
@@ -125,7 +125,7 @@
         return {}
 
     # avoid silly behavior for update from empty dir
-    if not m1:
+    if not m1 or not m2 or not ma:
         return {}
 
     dcopies = repo.dirstate.copies()
@@ -188,7 +188,7 @@
         repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m))
         action.append((f, m) + args)
 
-    if pa and not (backwards or overwrite):
+    if not (backwards or overwrite):
         copy = findcopies(repo, m1, m2, ma, pa.rev())
     copied = dict.fromkeys(copy.values())