docket: make compatible with py3.6, where Struct.format is bytes
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 25 May 2021 16:46:32 -0700
changeset 47351 710435a5c469
parent 47350 dc3800569157
child 47352 5e12b6bfdd3e
docket: make compatible with py3.6, where Struct.format is bytes Differential Revision: https://phab.mercurial-scm.org/D10770
mercurial/revlogutils/docket.py
--- a/mercurial/revlogutils/docket.py	Sun May 30 22:12:48 2021 +0200
+++ b/mercurial/revlogutils/docket.py	Tue May 25 16:46:32 2021 -0700
@@ -95,7 +95,9 @@
 # * 8 bytes: size of data
 # * 8 bytes: pending size of data
 # * 1 bytes: default compression header
-S_HEADER = struct.Struct(constants.INDEX_HEADER.format + 'BBLLLLc')
+S_HEADER = struct.Struct(
+    pycompat.sysstr(constants.INDEX_HEADER.format) + 'BBLLLLc'
+)
 
 
 class RevlogDocket(object):