comparison mercurial/revlogutils/constants.py @ 47251:6bfa6c2c5f15

revlogv2: preserve the compression mode on disk The value is still the same and still not treated, but now it exists one disk. Differential Revision: https://phab.mercurial-scm.org/D10648
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 18:41:51 +0200
parents 130c9f7ed914
children b876f0bf7366
comparison
equal deleted inserted replaced
47250:4dca422d3907 47251:6bfa6c2c5f15
83 # 4 bytes: parent 1 rev 83 # 4 bytes: parent 1 rev
84 # 4 bytes: parent 2 rev 84 # 4 bytes: parent 2 rev
85 # 32 bytes: nodeid 85 # 32 bytes: nodeid
86 # 8 bytes: sidedata offset 86 # 8 bytes: sidedata offset
87 # 4 bytes: sidedata compressed length 87 # 4 bytes: sidedata compressed length
88 # 20 bytes: Padding to align to 96 bytes (see RevlogV2Plan wiki page) 88 # 1 bytes: compression mode (2 lower bit are data_compression_mode)
89 INDEX_ENTRY_V2 = struct.Struct(b">Qiiiiii20s12xQi20x") 89 # 19 bytes: Padding to align to 96 bytes (see RevlogV2Plan wiki page)
90 assert INDEX_ENTRY_V2.size == 32 * 3 90 INDEX_ENTRY_V2 = struct.Struct(b">Qiiiiii20s12xQiB19x")
91 assert INDEX_ENTRY_V2.size == 32 * 3, INDEX_ENTRY_V2.size
91 92
92 # revlog index flags 93 # revlog index flags
93 94
94 # For historical reasons, revlog's internal flags were exposed via the 95 # For historical reasons, revlog's internal flags were exposed via the
95 # wire protocol and are even exposed in parts of the storage APIs. 96 # wire protocol and are even exposed in parts of the storage APIs.