Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

Commit d229f93f authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

py3: use pycompat.bytestr() on extra values because it can be int

One such example is {'close': 1} which marks a branch as closed.

This makes test-convert-mtn.t pass on Python 3.

Differential Revision: https://phab.mercurial-scm.org/D5864
parent 83d62df28ab6
......@@ -121,6 +121,7 @@ test-convert-git.t
test-convert-hg-sink.t
test-convert-hg-source.t
test-convert-hg-startrev.t
test-convert-mtn.t
test-convert-splicemap.t
test-convert-svn-sink.t
test-convert-tagsbranch-topology.t
......
......@@ -70,7 +70,10 @@ def decodeextra(text):
def encodeextra(d):
# keys must be sorted to produce a deterministic changelog entry
items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)]
items = [
_string_escape('%s:%s' % (k, pycompat.bytestr(d[k])))
for k in sorted(d)
]
return "\0".join(items)
def stripdesc(desc):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment