From patchwork Fri Jan 17 15:15:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7498: localrepo: also fast past the parents of working copies parents From: phabricator X-Patchwork-Id: 44482 Message-Id: <7ee2881b3a36662e8664370d1588a61d@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 17 Jan 2020 15:15:10 +0000 Closed by commit rHG5a012404503b: localrepo: also fast past the parents of working copies parents (authored by marmoute). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7498?vs=19364&id=19412 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7498/new/ 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, pulkit Cc: pulkit, mercurial-devel 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 @@ -111,7 +110,6 @@ $ hg export exporting patch: - debug.filters: computing revision filter for "visible" # HG changeset patch # User test # Date 0 0 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -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]