mercurial/context.py
branchstable
changeset 24862 c82d88dfaf59
parent 24818 8d7d0bf62f9f
child 24922 d9fb88c045a0
child 25193 ccb1623266eb
--- a/mercurial/context.py	Sun Apr 26 15:13:13 2015 -0400
+++ b/mercurial/context.py	Sat Apr 25 15:38:06 2015 +0900
@@ -887,6 +887,11 @@
         getlog = util.lrucachefunc(lambda x: self._repo.file(x))
 
         def parents(f):
+            # Cut _descendantrev here to mitigate the penalty of lazy linkrev
+            # adjustment. Otherwise, p._adjustlinkrev() would walk changelog
+            # from the topmost introrev (= srcrev) down to p.linkrev() if it
+            # isn't an ancestor of the srcrev.
+            f._changeid
             pl = f.parents()
 
             # Don't return renamed parents if we aren't following.