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

login
register
mail settings
Submitter phabricator
Date Feb. 5, 2019, 10:45 p.m.
Message ID <380281db759bdbd4482f2c746c644f0d@localhost.localdomain>
Download mbox | patch
Permalink /patch/38458/
State Not Applicable
Headers show

Comments

phabricator - Feb. 5, 2019, 10:45 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGb436059c1cca: py3: use pycompat.bytestr() on extra values because it can be int (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5864?vs=13831&id=13835

REVISION DETAIL
  https://phab.mercurial-scm.org/D5864

AFFECTED FILES
  contrib/python3-whitelist
  mercurial/changelog.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -70,7 +70,10 @@ 
 
 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):
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -121,6 +121,7 @@ 
 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