##// END OF EJS Templates
py3: use `x.hex()` instead of `pycompat.sysstr(node.hex(x))`
Manuel Jacob -
r50195:22712409 default
parent child Browse files
Show More
@@ -1,8 +1,6 b''
1 1 """utilities to assist in working with pygit2"""
2 2
3 from mercurial.node import bin, hex, sha1nodeconstants
4
5 from mercurial import pycompat
3 from mercurial.node import bin, sha1nodeconstants
6 4
7 5 pygit2_module = None
8 6
@@ -38,7 +36,7 b' def togitnode(n):'
38 36 pygit2 and sqlite both need nodes as strings, not bytes.
39 37 """
40 38 assert len(n) == 20
41 return pycompat.sysstr(hex(n))
39 return n.hex()
42 40
43 41
44 42 def fromgitnode(n):
@@ -159,7 +159,7 b' class BranchMapCache:'
159 159
160 160 def _unknownnode(node):
161 161 """raises ValueError when branchcache found a node which does not exists"""
162 raise ValueError('node %s does not exist' % pycompat.sysstr(hex(node)))
162 raise ValueError('node %s does not exist' % node.hex())
163 163
164 164
165 165 def _branchcachedesc(repo):
@@ -647,9 +647,7 b' class obsstore:'
647 647 if len(succ) != 20:
648 648 raise ValueError(succ)
649 649 if prec in succs:
650 raise ValueError(
651 'in-marker cycle with %s' % pycompat.sysstr(hex(prec))
652 )
650 raise ValueError('in-marker cycle with %s' % prec.hex())
653 651
654 652 metadata = tuple(sorted(metadata.items()))
655 653 for k, v in metadata:
General Comments 0
You need to be logged in to leave comments. Login now