D2540: tests: port helper script revlog-formatv0.py to python 3

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Mar 2 14:50:21 UTC 2018


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/revlog-formatv0.py

CHANGE DETAILS

diff --git a/tests/revlog-formatv0.py b/tests/revlog-formatv0.py
--- a/tests/revlog-formatv0.py
+++ b/tests/revlog-formatv0.py
@@ -18,6 +18,7 @@
 """
 
 from __future__ import absolute_import
+import binascii
 import os
 import sys
 
@@ -56,7 +57,7 @@
 
 for name, data in files:
     f = open(name, 'wb')
-    f.write(data.decode('hex'))
+    f.write(binascii.unhexlify(data))
     f.close()
 
 sys.exit(0)



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list