Bug 1286900 - Set env explicitly because mozharness; r=me
☠☠ backed out by cda7c3e91ad7 ☠ ☠
authorGregory Szorc <gps@mozilla.com>
Tue, 04 Oct 2016 10:58:05 -0700
changeset 316414 3fff88de2f2d5194bc940ad67ca2187498d00243
parent 316413 97a9b83bc394ce7011384b1022c4c080e25fb73d
child 316415 df26b07efb46d767397e45dcc93a7132fbbeff3a
push id30770
push userkwierso@gmail.com
push dateWed, 05 Oct 2016 00:00:48 +0000
treeherdermozilla-central@3470e326025c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1286900
milestone52.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 1286900 - Set env explicitly because mozharness; r=me partial_env only works if the class inherits from some other base class, which apparently not all callers of this method do. So just pass a copy of the environ dict with PYTHONUNBUFFERED added. MozReview-Commit-ID: Ag75x28NR4D
testing/mozharness/mozharness/base/vcs/mercurial.py
--- a/testing/mozharness/mozharness/base/vcs/mercurial.py
+++ b/testing/mozharness/mozharness/base/vcs/mercurial.py
@@ -383,18 +383,19 @@ class MercurialVCS(ScriptMixin, LogMixin
 
         if rev:
             args.extend(['--revision', rev])
         if branch:
             args.extend(['--branch', branch])
 
         parser = RepositoryUpdateRevisionParser(config=self.config,
                                                 log_obj=self.log_obj)
-        if self.run_command(args, output_parser=parser,
-                            partial_env={'PYTHONUNBUFFERED': '1'}):
+        env = dict(os.environ)
+        env[b'PYTHONUNBUFFERED'] = b'1'
+        if self.run_command(args, output_parser=parser, env=env):
             raise VCSException('repo checkout failed!')
 
         if not parser.revision:
             raise VCSException('could not identify revision updated to')
 
         return parser.revision
 
     def apply_and_push(self, localrepo, remote, changer, max_attempts=10,