changeset 31374:28e3471a21ef

manifest: use node.bin instead of .decode('hex') The latter doesn't work in Python 3.
author Augie Fackler <augie@google.com>
date Sun, 12 Mar 2017 03:29:48 -0400
parents 91874c247d61
children 45347d4a4f07
files mercurial/manifest.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/manifest.py	Sun Mar 12 00:43:20 2017 -0500
+++ b/mercurial/manifest.py	Sun Mar 12 03:29:48 2017 -0400
@@ -12,6 +12,7 @@
 import struct
 
 from .i18n import _
+from .node import bin
 from . import (
     error,
     mdiff,
@@ -151,7 +152,7 @@
     __next__ = next
 
 def unhexlify(data, extra, pos, length):
-    s = data[pos:pos + length].decode('hex')
+    s = bin(data[pos:pos + length])
     if extra:
         s += chr(extra & 0xff)
     return s