changeset 36418:d26b0bedfaa4

util: use pycompat.bytestr() instead of str() This fixes at least some environment variable prints for util.system() callers on Python 3. Yay! Differential Revision: https://phab.mercurial-scm.org/D2434
author Augie Fackler <augie@google.com>
date Sun, 25 Feb 2018 22:06:53 -0500
parents 199443c55463
children 75c76cee1b1b
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Wed Feb 21 22:47:47 2018 +0900
+++ b/mercurial/util.py	Sun Feb 25 22:06:53 2018 -0500
@@ -1188,7 +1188,7 @@
             return '0'
         if val is True:
             return '1'
-        return str(val)
+        return pycompat.bytestr(val)
     env = dict(encoding.environ)
     if environ:
         env.update((k, py2shell(v)) for k, v in environ.iteritems())