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

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 4:18 p.m.
Message ID <8407bb6e5de6a47705211d93bc68180e@localhost.localdomain>
Download mbox | patch
Permalink /patch/28689/
State Not Applicable
Headers show

Comments

phabricator - March 2, 2018, 4:18 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9805c906aaad: tests: port helper script revlog-formatv0.py to python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2540?vs=6330&id=6354

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

AFFECTED FILES
  tests/revlog-formatv0.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
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)