Patchwork D7486: locarepo: also fastpath `nullid` lookup in __getitem__

login
register
mail settings
Submitter phabricator
Date Nov. 24, 2019, 12:59 a.m.
Message ID <433042367fd00eb6055042af6a0010c4@localhost.localdomain>
Download mbox | patch
Permalink /patch/43499/
State Not Applicable
Headers show

Comments

phabricator - Nov. 24, 2019, 12:59 a.m.
Closed by commit rHGc9d1e2ec1e2e: locarepo: also fastpath `nullid` lookup in __getitem__ (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D7486?vs=18356&id=18372#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7486?vs=18356&id=18372

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

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

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1531,7 +1531,7 @@ 
             ]
 
         # dealing with some special values
-        if changeid == b'null' or changeid == nullrev:
+        if changeid == b'null' or changeid == nullrev or changeid == nullid:
             return context.changectx(self, nullrev, nullid, maybe_filtered=False)
         if changeid == b'tip':
             node = self.changelog.tip()