mercurial/copies.py
changeset 44276 30862e226339
parent 44237 b4057d001760
child 44758 45f3f35cefe7
child 44909 d452acc8cce8
--- a/mercurial/copies.py	Tue Feb 04 10:14:44 2020 -0800
+++ b/mercurial/copies.py	Tue Feb 04 10:16:30 2020 -0800
@@ -403,13 +403,15 @@
         )
     if x == y or not x or not y:
         return {}
+    if y.rev() is None and x == y.p1():
+        if debug:
+            repo.ui.debug(b'debug.copies: search mode: dirstate\n')
+        # short-circuit to avoid issues with merge states
+        return _dirstatecopies(repo, match)
     a = y.ancestor(x)
     if a == x:
         if debug:
             repo.ui.debug(b'debug.copies: search mode: forward\n')
-        if y.rev() is None and x == y.p1():
-            # short-circuit to avoid issues with merge states
-            return _dirstatecopies(repo, match)
         copies = _forwardcopies(x, y, match=match)
     elif a == y:
         if debug: