py3kcompat: don't convert os.environ to bytes
os.environ accepts str not bytes. Assigning bytes will result in a
run-time error.
--- a/mercurial/py3kcompat.py Sat May 10 14:57:25 2014 -0700
+++ b/mercurial/py3kcompat.py Sat May 10 15:22:04 2014 -0700
@@ -52,13 +52,6 @@
return ret.encode('utf-8', 'surrogateescape')
builtins.bytesformatter = bytesformatter
-# Create bytes equivalents for os.environ values
-for key in list(os.environ.keys()):
- # UTF-8 is fine for us
- bkey = key.encode('utf-8', 'surrogateescape')
- bvalue = os.environ[key].encode('utf-8', 'surrogateescape')
- os.environ[bkey] = bvalue
-
origord = builtins.ord
def fakeord(char):
if isinstance(char, int):