D1770: revlog: use revlog index entry type for version 0 revlogs
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Dec 27 00:36:25 UTC 2017
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
The pure Python parser for version 1 revlogs uses it. Let's
plug it into version 0 revlogs as well.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1770
AFFECTED FILES
mercurial/revlog.py
CHANGE DETAILS
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -278,14 +278,17 @@
off += s
e = indexformatv0_unpack(cur)
# transform to revlogv1 format
- e2 = (offset_type(e[0], 0), e[1], -1, e[2], e[3],
- nodemap.get(e[4], nullrev), nodemap.get(e[5], nullrev), e[6])
+ e2 = parsers.IndexV1Entry(offset_type(e[0], 0), e[1], -1,
+ e[2], e[3],
+ nodemap.get(e[4], nullrev),
+ nodemap.get(e[5], nullrev),
+ e[6])
index.append(e2)
nodemap[e[6]] = n
n += 1
# add the magic null revision at -1
- index.append((0, 0, 0, -1, -1, -1, -1, nullid))
+ index.append(parsers.IndexV1Entry(0, 0, 0, -1, -1, -1, -1, nullid))
return index, nodemap, None
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list