Patchwork D2141: py3: cast repr() result to bytes

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 1:39 a.m.
Message ID <d5f6509e69d2e3d5f966fc0edc3955d4@localhost.localdomain>
Download mbox | patch
Permalink /patch/27607/
State Not Applicable
Headers show

Comments

phabricator - Feb. 12, 2018, 1:39 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG0fb0c304ebd6: py3: cast repr() result to bytes (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2141?vs=5426&id=5442

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

AFFECTED FILES
  mercurial/formatter.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/formatter.py b/mercurial/formatter.py
--- a/mercurial/formatter.py
+++ b/mercurial/formatter.py
@@ -291,7 +291,7 @@ 
         self._out = out
         self._out.write("%s = [\n" % self._topic)
     def _showitem(self):
-        self._out.write("    " + repr(self._item) + ",\n")
+        self._out.write('    %s,\n' % pycompat.sysbytes(repr(self._item)))
     def end(self):
         baseformatter.end(self)
         self._out.write("]\n")