changeset 40274:a8b9174517c7

formatter: use stringutil.pprint() in debug output to drop b''
author Yuya Nishihara <yuya@tcha.org>
date Sun, 14 Oct 2018 06:51:19 +0200
parents 3b275f549777
children f2fbd32c7664
files mercurial/formatter.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/formatter.py	Thu Sep 27 16:56:15 2018 +0200
+++ b/mercurial/formatter.py	Sun Oct 14 06:51:19 2018 +0200
@@ -129,7 +129,10 @@
     templateutil,
     util,
 )
-from .utils import dateutil
+from .utils import (
+    dateutil,
+    stringutil,
+)
 
 pickle = util.pickle
 
@@ -321,7 +324,7 @@
         self._out = out
         self._out.write("%s = [\n" % self._topic)
     def _showitem(self):
-        self._out.write('    %s,\n' % pycompat.byterepr(self._item))
+        self._out.write('    %s,\n' % stringutil.pprint(self._item))
     def end(self):
         baseformatter.end(self)
         self._out.write("]\n")