diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -1187,7 +1187,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())