# HG changeset patch # User Pierre-Yves David # Date 2019-11-17 05:36:50 # Node ID 099e9610308546bfbf6ff946f4a38a814cfbbc0d # Parent a7a4b3b28c52451be968b2465b385be8c68c35b7 localrepo: also fastpath `nullrev` in __getitem__ As explained earlier, nullrev will exist in all repository, we do not need any special checking. Differential Revision: https://phab.mercurial-scm.org/D7480 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1531,7 +1531,7 @@ class localrepository(object): ] # 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()