Mercurial > public > mercurial-scm > hg
diff mercurial/revlogutils/constants.py @ 47270:25ce16bf724b
changelogv2: use a dedicated on disk format for changelogv2
We drop two unused entry. This is mostly a proof of concept before starting to
actually rework the format.
Differential Revision: https://phab.mercurial-scm.org/D10667
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 04 May 2021 11:20:10 +0200 |
parents | 921648d31553 |
children | 298d4400ea68 |
line wrap: on
line diff
--- a/mercurial/revlogutils/constants.py Tue May 04 14:18:06 2021 +0200 +++ b/mercurial/revlogutils/constants.py Tue May 04 11:20:10 2021 +0200 @@ -93,6 +93,20 @@ INDEX_ENTRY_V2 = struct.Struct(b">Qiiiiii20s12xQiB19x") assert INDEX_ENTRY_V2.size == 32 * 3, INDEX_ENTRY_V2.size +# 6 bytes: offset +# 2 bytes: flags +# 4 bytes: compressed length +# 4 bytes: uncompressed length +# 4 bytes: parent 1 rev +# 4 bytes: parent 2 rev +# 32 bytes: nodeid +# 8 bytes: sidedata offset +# 4 bytes: sidedata compressed length +# 1 bytes: compression mode (2 lower bit are data_compression_mode) +# 27 bytes: Padding to align to 96 bytes (see RevlogV2Plan wiki page) +INDEX_ENTRY_CL_V2 = struct.Struct(b">Qiiii20s12xQiB27x") +assert INDEX_ENTRY_CL_V2.size == 32 * 3, INDEX_ENTRY_V2.size + # revlog index flags # For historical reasons, revlog's internal flags were exposed via the