Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlogutils/constants.py @ 47377: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 |
line wrap: on
line diff
--- 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