diff -r ab5fd39cb402 -r 298d4400ea68 mercurial/revlogutils/constants.py --- a/mercurial/revlogutils/constants.py Tue Jun 01 09:18:27 2021 +0200 +++ b/mercurial/revlogutils/constants.py Thu Jun 03 16:12:03 2021 +0200 @@ -29,7 +29,9 @@ ### main revlog header -INDEX_HEADER = struct.Struct(b">I") +# We cannot rely on Struct.format is inconsistent for python <=3.6 versus above +INDEX_HEADER_FMT = b">I" +INDEX_HEADER = struct.Struct(INDEX_HEADER_FMT) ## revlog version REVLOGV0 = 0