Mercurial > public > mercurial-scm > hg
diff mercurial/revlogutils/constants.py @ 48500:c5d6c874766a
rank: actually persist revision's rank in changelog-v2
The changelog v2 format is now persisting whatever "rank" value is recorded.
However keep in mind that for we do not record any value.
Differential Revision: https://phab.mercurial-scm.org/D11937
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 15 Dec 2021 15:28:41 +0100 |
parents | 52034c42c09d |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/mercurial/revlogutils/constants.py Tue Dec 14 23:56:38 2021 +0100 +++ b/mercurial/revlogutils/constants.py Wed Dec 15 15:28:41 2021 +0100 @@ -192,8 +192,9 @@ # 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") +# 4 bytes: changeset rank (i.e. `len(::REV)`) +# 23 bytes: Padding to align to 96 bytes (see RevlogV2Plan wiki page) +INDEX_ENTRY_CL_V2 = struct.Struct(b">Qiiii20s12xQiBi23x") assert INDEX_ENTRY_CL_V2.size == 32 * 3, INDEX_ENTRY_CL_V2.size INDEX_ENTRY_V2_IDX_OFFSET = 0 INDEX_ENTRY_V2_IDX_COMPRESSED_LENGTH = 1 @@ -204,6 +205,7 @@ INDEX_ENTRY_V2_IDX_SIDEDATA_OFFSET = 6 INDEX_ENTRY_V2_IDX_SIDEDATA_COMPRESSED_LENGTH = 7 INDEX_ENTRY_V2_IDX_COMPRESSION_MODE = 8 +INDEX_ENTRY_V2_IDX_RANK = 9 # revlog index flags