Patchwork D7494: localrepo: fastpath access to "."

login
register
mail settings
Submitter phabricator
Date Nov. 23, 2019, 1:04 p.m.
Message ID <2944d0eb5bd200eed985a1f6e7ac022d@localhost.localdomain>
Download mbox | patch
Permalink /patch/43486/
State Not Applicable
Headers show

Comments

phabricator - Nov. 23, 2019, 1:04 p.m.
marmoute updated this revision to Diff 18359.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7494?vs=18301&id=18359

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
Cc: mercurial-devel

Patch

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