Patchwork D7498: localrepo: also fast past the parents of working copies parents

login
register
mail settings
Submitter phabricator
Date Nov. 22, 2019, 9:23 a.m.
Message ID <differential-rev-PHID-DREV-3mdpcrr4f5p43soo2anc-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43434/
State Superseded
Headers show

Comments

phabricator - Nov. 22, 2019, 9:23 a.m.
marmoute created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  There are a descent odds that their will be needed too. So we also cache and
  fastpath them.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7498

AFFECTED FILES
  mercurial/localrepo.py
  tests/test-repo-filters-tiptoe.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-devel
phabricator - Jan. 17, 2020, 2:59 p.m.
This revision is now accepted and ready to land.
pulkit added a comment.
pulkit accepted this revision.


  > There are a descent odds that their will be needed too.
  
  There are descent odds that they will be needed too.
  
  made the above edit in flight.

REPOSITORY
  rHG Mercurial

BRANCH
  default

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7498/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7498

To: marmoute, #hg-reviewers, pulkit
Cc: pulkit, mercurial-devel

Patch

diff --git a/tests/test-repo-filters-tiptoe.t b/tests/test-repo-filters-tiptoe.t
--- a/tests/test-repo-filters-tiptoe.t
+++ b/tests/test-repo-filters-tiptoe.t
@@ -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
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1540,6 +1540,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]