localrepo: also fast past the parents of working copies parents
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 21 Nov 2019 23:25:08 +0100
changeset 44107 5a012404503b
parent 44106 bfaf4c673bec
child 44108 c472970339d2
localrepo: also fast past the parents of working copies parents There are descent odds that they will be needed too. So we also cache and fastpath them. Differential Revision: https://phab.mercurial-scm.org/D7498
mercurial/localrepo.py
tests/test-repo-filters-tiptoe.t
--- a/mercurial/localrepo.py	Sun Nov 17 14:54:41 2019 +0100
+++ b/mercurial/localrepo.py	Thu Nov 21 23:25:08 2019 +0100
@@ -1543,6 +1543,14 @@
             pair = (rev, node)
             quick[rev] = pair
             quick[node] = pair
+            # also add the parents of the parents
+            for r in cl.parentrevs(rev):
+                if r == nullrev:
+                    continue
+                n = cl.node(r)
+                pair = (r, n)
+                quick[r] = pair
+                quick[n] = pair
         p1node = self.dirstate.p1()
         if p1node != nullid:
             quick[b'.'] = quick[p1node]
--- a/tests/test-repo-filters-tiptoe.t	Sun Nov 17 14:54:41 2019 +0100
+++ b/tests/test-repo-filters-tiptoe.t	Thu Nov 21 23:25:08 2019 +0100
@@ -93,7 +93,6 @@
   @@ -0,0 +1,1 @@
   +d
   $ hg diff --change .
-  debug.filters: computing revision filter for "visible"
   diff -r 05293e5dd8d1ae4f84a8520a11c6f97cad26deca -r c2932ca7786be30b67154d541a8764fae5532261 c
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   +++ b/c	Thu Jan 01 00:00:00 1970 +0000
@@ -111,7 +110,6 @@
 
   $ hg export
   exporting patch:
-  debug.filters: computing revision filter for "visible"
   # HG changeset patch
   # User test
   # Date 0 0