##// END OF EJS Templates
node: make bin() be a wrapper instead of just an alias...
Augie Fackler -
r36256:f574cc00 default
parent child Browse files
Show More
@@ -183,7 +183,6 b' unexpectedly::'
183 183
184 184 from __future__ import absolute_import
185 185
186 import binascii
187 186 import errno
188 187 import os
189 188
@@ -426,7 +425,7 b' class histeditaction(object):'
426 425 rulehash = rule.strip().split(' ', 1)[0]
427 426 try:
428 427 rev = node.bin(rulehash)
429 except (TypeError, binascii.Error):
428 except TypeError:
430 429 raise error.ParseError("invalid changeset %s" % rulehash)
431 430 return cls(state, rev)
432 431
@@ -11,7 +11,14 b' import binascii'
11 11
12 12 # This ugly style has a noticeable effect in manifest parsing
13 13 hex = binascii.hexlify
14 bin = binascii.unhexlify
14 # Adapt to Python 3 API changes. If this ends up showing up in
15 # profiles, we can use this version only on Python 3, and forward
16 # binascii.unhexlify like we used to on Python 2.
17 def bin(s):
18 try:
19 return binascii.unhexlify(s)
20 except binascii.Error as e:
21 raise TypeError(e)
15 22
16 23 nullrev = -1
17 24 nullid = b"\0" * 20
@@ -13,7 +13,6 b' and O(changes) merge between branches.'
13 13
14 14 from __future__ import absolute_import
15 15
16 import binascii
17 16 import collections
18 17 import contextlib
19 18 import errno
@@ -1430,7 +1429,7 b' class revlog(object):'
1430 1429 if maybewdir:
1431 1430 raise error.WdirUnsupported
1432 1431 return None
1433 except (TypeError, binascii.Error):
1432 except TypeError:
1434 1433 pass
1435 1434
1436 1435 def lookup(self, id):
General Comments 0
You need to be logged in to leave comments. Login now