Failed pipeline for branch/default | mercurial-devel | d8d51c43

2021-06-02 Thread Heptapod


Pipeline #22723 has failed!

Project: mercurial-devel ( https://foss.heptapod.net/octobus/mercurial-devel )
Branch: branch/default ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commits/branch/default )

Commit: d8d51c43 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/commit/d8d51c43c2233a6024101030095596283ab74c2b
 )
Commit Message: index: use an explicit constant for INDEX_HEADE...
Commit Author: Pierre-Yves David ( https://foss.heptapod.net/marmoute )

Pipeline #22723 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/pipelines/22723 ) triggered 
by Administrator ( https://foss.heptapod.net/root )
had 1 failed build.

Job #203949 ( 
https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/203949/raw )

Stage: tests
Name: test-py2

-- 
You're receiving this email because of your account on foss.heptapod.net.



___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D10831: index: use an explicit constant for INDEX_HEADER format and use it for docket

2021-06-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This avoid leaking python-3.6 compatibility details too much.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/revlogutils/constants.py
  mercurial/revlogutils/docket.py

CHANGE DETAILS

diff --git a/mercurial/revlogutils/docket.py b/mercurial/revlogutils/docket.py
--- a/mercurial/revlogutils/docket.py
+++ b/mercurial/revlogutils/docket.py
@@ -95,9 +95,7 @@
 # * 8 bytes: size of data
 # * 8 bytes: pending size of data
 # * 1 bytes: default compression header
-S_HEADER = struct.Struct(
-pycompat.sysstr(constants.INDEX_HEADER.format) + 'BBc'
-)
+S_HEADER = struct.Struct(constants.INDEX_HEADER_FMT + b'BBc')
 
 
 class RevlogDocket(object):
diff --git a/mercurial/revlogutils/constants.py 
b/mercurial/revlogutils/constants.py
--- a/mercurial/revlogutils/constants.py
+++ b/mercurial/revlogutils/constants.py
@@ -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



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel