filectx: use linkrev to sort ancestors stable
authorMatt Mackall <mpm@selenic.com>
Sun, 01 Feb 2015 16:23:07 -0600
branchstable
changeset 23981 24b57c3899f8
parent 23980 c1ce5442453f
child 23982 751d1138ce35
filectx: use linkrev to sort ancestors We're going to make rev() lazily do _adjustlinkrevs, and we don't want that to happen when we're quickly tracing through file ancestry without caring about revs (as we do when finding copies). This takes us back to pre-linkrev-correction behavior, but shouldn't regress us relative to the last stable release.
mercurial/context.py
--- a/mercurial/context.py	Fri Jan 30 16:02:28 2015 +0000
+++ b/mercurial/context.py	Sun Feb 01 16:23:07 2015 -0600
@@ -954,7 +954,7 @@
         cut = followfirst and 1 or None
         while True:
             for parent in c.parents()[:cut]:
-                visit[(parent.rev(), parent.node())] = parent
+                visit[(parent.linkrev(), parent.filenode())] = parent
             if not visit:
                 break
             c = visit.pop(max(visit))