D7480: localrepo: also fastpath `nullrev` in __getitem__

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Nov 23 06:54:03 EST 2019


marmoute updated this revision to Diff 18347.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7480?vs=18332&id=18347

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

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()



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


More information about the Mercurial-devel mailing list