py3: cast repr() result to bytes
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 11 Feb 2018 14:21:44 -0800
changeset 36040 0fb0c304ebd6
parent 36039 c1e01b1d5543
child 36041 e3674c2a585c
py3: cast repr() result to bytes Differential Revision: https://phab.mercurial-scm.org/D2141
mercurial/formatter.py
--- a/mercurial/formatter.py	Sun Feb 11 13:00:00 2018 -0800
+++ b/mercurial/formatter.py	Sun Feb 11 14:21:44 2018 -0800
@@ -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")