changeset 44105:d86dede17392

localrepo: fastpath access to "." "." is just an alias for `p1(wdir())`, let us handle it that way. Differential Revision: https://phab.mercurial-scm.org/D7494
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 17 Nov 2019 14:47:29 +0100
parents 85c4cd73996b
children bfaf4c673bec
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sun Nov 17 14:39:28 2019 +0100
+++ b/mercurial/localrepo.py	Sun Nov 17 14:47:29 2019 +0100
@@ -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