Patchwork D10770: docket: make compatible with py3.6, where Struct.format is bytes

login
register
mail settings
Submitter phabricator
Date May 25, 2021, 11:55 p.m.
Message ID <differential-rev-PHID-DREV-yjfq2pisc7p52ukvehwk-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49090/
State Superseded
Headers show

Comments

phabricator - May 25, 2021, 11:55 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10770

AFFECTED FILES
  mercurial/revlogutils/docket.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/revlogutils/docket.py b/mercurial/revlogutils/docket.py
--- a/mercurial/revlogutils/docket.py
+++ b/mercurial/revlogutils/docket.py
@@ -93,7 +93,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 + 'LLLLc')
+S_HEADER = struct.Struct(
+    pycompat.sysstr(constants.INDEX_HEADER.format) + 'LLLLc'
+)
 
 
 class RevlogDocket(object):