Skip to content

Commit

Permalink
Fix the #207 detection code to work better with python3
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Feb 1, 2022
1 parent 612e11d commit 955f6ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cinnabar/githg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ def tagset_lines(tags):
util.iteritems(stored_files)):
if not GitHgHelper.check_file(node, parent1, parent2):
busted = True
logging.error("Error in file %s" % node)
logging.error("Error in file %s" % node.decode('ascii', 'replace'))
if busted:
import json
extra = ""
Expand Down
6 changes: 3 additions & 3 deletions cinnabar/hg/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ def getbundle(self, name, heads, common, *args, **kwargs):
heads = [hexlify(h) for h in heads]
common = [hexlify(c) for c in common]
bundlecaps = b','.join(kwargs.get('bundlecaps', ()))
getbundle_params["heads"] = heads
getbundle_params["common"] = common
getbundle_params["bundlecaps"] = bundlecaps
getbundle_params["heads"] = [h.decode('ascii', 'replace') for h in heads]
getbundle_params["common"] = [c.decode('ascii', 'replace') for c in common]
getbundle_params["bundlecaps"] = bundlecaps.decode('utf-8', 'replace')
data = HgRepoHelper.getbundle(heads, common, bundlecaps)
header = readexactly(data, 4)
if header == b'HG20':
Expand Down

0 comments on commit 955f6ba

Please sign in to comment.