Fix copy detection corner case
authorMatt Mackall <mpm@selenic.com>
Tue, 12 Dec 2006 17:52:33 -0600
changeset 3875 c0a12e6441a5
parent 3874 e88d03c2a3d9
child 3876 1e0b94cfba0e
child 3884 daa42bac8611
Fix copy detection corner case We were aborting if the copied from rev was before the cut-off limit, rather than the copied _to_ rev. The copied from rev can be arbitrarily old.
mercurial/merge.py
--- a/mercurial/merge.py	Tue Dec 12 12:40:51 2006 -0800
+++ b/mercurial/merge.py	Tue Dec 12 17:52:33 2006 -0600
@@ -109,10 +109,10 @@
         visit = [fctx]
         while visit:
             fc = visit.pop()
+            if fc.path() != orig and fc.path() not in old:
+                old[fc.path()] = 1
             if fc.rev() < limit:
                 continue
-            if fc.path() != orig and fc.path() not in old:
-                old[fc.path()] = 1
             visit += fc.parents()
 
         old = old.keys()