Patchwork D7494: localrepo: fastpath access to "."

login
register
mail settings
Submitter phabricator
Date Jan. 17, 2020, 3:14 p.m.
Message ID <1c7cb2964bfa0a1d3835bf9945885ce4@localhost.localdomain>
Download mbox | patch
Permalink /patch/44481/
State Not Applicable
Headers show

Comments

phabricator - Jan. 17, 2020, 3:14 p.m.
Closed by commit rHGd86dede17392: localrepo: fastpath access to &quot;.&quot; (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/D7494?vs=19362&id=19410

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

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1543,6 +1543,9 @@ 
             pair = (rev, node)
             quick[rev] = pair
             quick[node] = pair
+        p1node = self.dirstate.p1()
+        if p1node != nullid:
+            quick[b'.'] = quick[p1node]
         return quick
 
     @unfilteredmethod