# HG changeset patch # User Pierre-Yves David # Date 2019-11-17 05:36:50 # Node ID 998dd6a8fd9801015dae7bbdd804ead36c1a2fed # Parent 3082ef682bc260734095ede09021c7398a41cfdc 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()