From patchwork Tue May 4 14:18:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10644: revlog: create a create `null_item` attribute for V0 From: phabricator X-Patchwork-Id: 48961 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 4 May 2021 14:18:07 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This value is currently wrong, but at least it is now -obviously- wrong. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10644 AFFECTED FILES mercurial/revlogutils/revlogv0.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/mercurial/revlogutils/revlogv0.py b/mercurial/revlogutils/revlogv0.py --- a/mercurial/revlogutils/revlogv0.py +++ b/mercurial/revlogutils/revlogv0.py @@ -42,6 +42,7 @@ class revlogoldindex(list): entry_size = INDEX_ENTRY_V0.size + null_item = (0, 0, 0, -1, -1, -1, -1, node.nullid) @property def nodemap(self): @@ -89,7 +90,7 @@ def __getitem__(self, i): if i == -1: - return (0, 0, 0, -1, -1, -1, -1, node.nullid) + return self.null_item return list.__getitem__(self, i) def pack_header(self, header):