[Updated] D9154: revlog: pre-compute null revlog item for pure version
joerg.sonnenberger (Joerg Sonnenberger)
phabricator at mercurial-scm.org
Tue Oct 6 09:04:11 UTC 2020
Closed by commit rHG7baf5f798ba9: revlog: pre-compute null revlog item for pure version (authored by joerg.sonnenberger).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D9154?vs=23042&id=23056
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D9154/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D9154
AFFECTED FILES
mercurial/pure/parsers.py
CHANGE DETAILS
diff --git a/mercurial/pure/parsers.py b/mercurial/pure/parsers.py
--- a/mercurial/pure/parsers.py
+++ b/mercurial/pure/parsers.py
@@ -37,6 +37,7 @@
indexfirst = struct.calcsize(b'Q')
sizeint = struct.calcsize(b'i')
indexsize = struct.calcsize(indexformatng)
+nullitem = (0, 0, 0, -1, -1, -1, -1, nullid)
def gettype(q):
@@ -103,7 +104,7 @@
def __getitem__(self, i):
if i == -1:
- return (0, 0, 0, -1, -1, -1, -1, nullid)
+ return nullitem
self._check_index(i)
if i >= self._lgt:
return self._extra[i - self._lgt]
To: joerg.sonnenberger, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20201006/b0b3279d/attachment-0002.html>
More information about the Mercurial-patches
mailing list