Patchwork D8332: py3: require values in changelog extras to be bytes

login
register
mail settings
Submitter phabricator
Date March 26, 2020, 10:18 a.m.
Message ID <ed861a9953d3fcabae69c5742c6b05c1@localhost.localdomain>
Download mbox | patch
Permalink /patch/45905/
State Not Applicable
Headers show

Comments

phabricator - March 26, 2020, 10:18 a.m.
Closed by commit rHG2141427533d2: py3: require values in changelog extras to be bytes (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8332?vs=20887&id=20889

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8332/new/

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

AFFECTED FILES
  mercurial/changelog.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/changelog.py b/mercurial/changelog.py
--- a/mercurial/changelog.py
+++ b/mercurial/changelog.py
@@ -82,10 +82,7 @@ 
 
 def encodeextra(d):
     # keys must be sorted to produce a deterministic changelog entry
-    items = [
-        _string_escape(b'%s:%s' % (k, pycompat.bytestr(d[k])))
-        for k in sorted(d)
-    ]
+    items = [_string_escape(b'%s:%s' % (k, d[k])) for k in sorted(d)]
     return b"\0".join(items)