manifest: use node.bin instead of .decode('hex')
authorAugie Fackler <augie@google.com>
Sun, 12 Mar 2017 03:29:48 -0400
changeset 31365 28e3471a21ef
parent 31364 91874c247d61
child 31366 45347d4a4f07
manifest: use node.bin instead of .decode('hex') The latter doesn't work in Python 3.
mercurial/manifest.py
--- 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