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

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 2:50 p.m.
Message ID <differential-rev-PHID-DREV-aw2n54isoclu7qaqd42n-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28665/
State Superseded
Headers show

Comments

phabricator - March 2, 2018, 2:50 p.m.
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




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

Patch

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)