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