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