wireprotov1server: use binascii.unhexlify
The "hex" codec doesn't exist in Python 3. We could use
`codecs.decode(h, 'hex_codec')`. But `binascii.unhexlify()`
exists and should work the same on Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D5755
--- a/contrib/python3-whitelist Wed Jan 30 12:55:44 2019 -0800
+++ b/contrib/python3-whitelist Wed Jan 30 13:07:20 2019 -0800
@@ -504,6 +504,7 @@
test-progress.t
test-propertycache.py
test-pull-branch.t
+test-pull-bundle.t
test-pull-http.t
test-pull-permission.t
test-pull-pull-corruption.t
--- a/mercurial/wireprotov1server.py Wed Jan 30 12:55:44 2019 -0800
+++ b/mercurial/wireprotov1server.py Wed Jan 30 13:07:20 2019 -0800
@@ -7,6 +7,7 @@
from __future__ import absolute_import
+import binascii
import os
from .i18n import _
@@ -344,7 +345,7 @@
one specific branch of many.
"""
def decodehexstring(s):
- return set([h.decode('hex') for h in s.split(';')])
+ return set([binascii.unhexlify(h) for h in s.split(';')])
manifest = repo.vfs.tryread('pullbundles.manifest')
if not manifest: