comparison mercurial/revlogutils/constants.py @ 47371:298d4400ea68

index: use an explicit constant for INDEX_HEADER format and use it for docket This avoid leaking python-3.6 compatibility details too much. Differential Revision: https://phab.mercurial-scm.org/D10831
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 03 Jun 2021 16:12:03 +0200
parents 25ce16bf724b
children 7a0ec25d5836
comparison
equal deleted inserted replaced
47370:ab5fd39cb402 47371:298d4400ea68
27 KIND_OTHER, 27 KIND_OTHER,
28 } 28 }
29 29
30 ### main revlog header 30 ### main revlog header
31 31
32 INDEX_HEADER = struct.Struct(b">I") 32 # We cannot rely on Struct.format is inconsistent for python <=3.6 versus above
33 INDEX_HEADER_FMT = b">I"
34 INDEX_HEADER = struct.Struct(INDEX_HEADER_FMT)
33 35
34 ## revlog version 36 ## revlog version
35 REVLOGV0 = 0 37 REVLOGV0 = 0
36 REVLOGV1 = 1 38 REVLOGV1 = 1
37 # Dummy value until file format is finalized. 39 # Dummy value until file format is finalized.