Bug 1515261 - [mozversioncontrol] Fix unicode env string on Windows, r=sheehan
☠☠ backed out by 8e2d7fcc07f5 ☠ ☠
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 04 Jan 2019 15:31:56 +0000
changeset 509651 5f6139ef7c2cc63904a73d6fe8b52031a295784d
parent 509650 165704210c3f00629f0e4a148f75c1b9e5160231
child 509652 7bb587c935d11d28f5e2720dc6a4a3ef199d6a0d
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssheehan
bugs1515261
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1515261 - [mozversioncontrol] Fix unicode env string on Windows, r=sheehan Differential Revision: https://phabricator.services.mozilla.com/D15727
python/mozversioncontrol/mozversioncontrol/__init__.py
--- a/python/mozversioncontrol/mozversioncontrol/__init__.py
+++ b/python/mozversioncontrol/mozversioncontrol/__init__.py
@@ -66,17 +66,17 @@ class Repository(object):
     all methods require this.
     """
 
     __metaclass__ = abc.ABCMeta
 
     def __init__(self, path, tool):
         self.path = os.path.abspath(path)
         self._tool = get_tool_path(tool)
-        self._env = os.environ.copy()
+        self._env = {k.encode('utf8'): v.encode('utf8') for k, v in os.environ.items()}
         self._version = None
         self._valid_diff_filter = ('m', 'a', 'd')
 
     def __enter__(self):
         return self
 
     def __exit__(self, exc_type, exc_value, exc_tb):
         pass