D2141: py3: cast repr() result to bytes

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Sun Feb 11 20:39:59 EST 2018


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

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")



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


More information about the Mercurial-devel mailing list