Patchwork D7480: localrepo: also fastpath `nullrev` in __getitem__

login
register
mail settings
Submitter phabricator
Date Nov. 23, 2019, 4:07 a.m.
Message ID <a2fce1de36ba4f0e8dc0835919b2b4fc@localhost.localdomain>
Download mbox | patch
Permalink /patch/43461/
State Not Applicable
Headers show

Comments

phabricator - Nov. 23, 2019, 4:07 a.m.
Closed by commit rHG099e96103085: localrepo: also fastpath `nullrev` in __getitem__ (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/D7480?vs=18287&id=18332

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

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

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':
+        if changeid == b'null' or changeid == nullrev:
             return context.changectx(self, nullrev, nullid)
         if changeid == b'tip':
             node = self.changelog.tip()