Backed out changeset 45f760e2a4c1 (bug 1583234) when causing linting failures CLOSED TREE
authorCiure Andrei <aciure@mozilla.com>
Tue, 01 Oct 2019 00:20:12 +0300
changeset 495744 06853f21480b55cfa64d1779ded3b3cf778c5cbc
parent 495743 c99e076208bbae17b323caa9642bec1095653c52
child 495745 b08fca6e85e747cb2e3422917ae04220d22e1444
push id114140
push userdvarga@mozilla.com
push dateWed, 02 Oct 2019 18:04:51 +0000
treeherdermozilla-inbound@32eb0ea893f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1583234
milestone71.0a1
backs out45f760e2a4c1f56747c6ff79ecd3f7eb59108976
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
Backed out changeset 45f760e2a4c1 (bug 1583234) when causing linting failures CLOSED TREE
python/mozbuild/mozbuild/artifacts.py
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -874,23 +874,16 @@ class Artifacts(object):
             self._cache_dir, log=self._log, skip_cache=self._skip_cache)
         self._pushhead_cache = PushheadCache(
             self._cache_dir, log=self._log, skip_cache=self._skip_cache)
 
     def log(self, *args, **kwargs):
         if self._log:
             self._log(*args, **kwargs)
 
-    def run_hg(self, *args, **kwargs):
-        env = kwargs.get('env', {})
-        env['HGPLAIN'] = '1'
-        kwargs['env'] = env
-        return subprocess.check_output([self._hg] + list(args),
-                                       **kwargs)
-
     def _guess_artifact_job(self):
         # Add the "-debug" suffix to the guessed artifact job name
         # if MOZ_DEBUG is enabled.
         if self._substs.get('MOZ_DEBUG'):
             target_suffix = '-debug'
         elif self._substs.get('MOZ_PGO'):
             target_suffix = '-pgo'
         else:
@@ -987,20 +980,22 @@ class Artifacts(object):
 
         If we're using git, retrieves hg revisions from git-cinnabar.
         """
         if self._git:
             return self._get_hg_revisions_from_git()
 
         # Mercurial updated the ordering of "last" in 4.3. We use revision
         # numbers to order here to accommodate multiple versions of hg.
-        last_revs = self.run_hg('log', '--template', '{rev}:{node}\n',
+        last_revs = subprocess.check_output([
+            self._hg, 'log',
+            '--template', '{rev}:{node}\n',
             '-r', 'last(public() and ::., {num})'.format(
-                num=NUM_REVISIONS_TO_QUERY),
-            cwd=self._topsrcdir).splitlines()
+                num=NUM_REVISIONS_TO_QUERY)
+        ], cwd=self._topsrcdir).splitlines()
 
         if len(last_revs) == 0:
             raise Exception("""\
 There are no public revisions.
 This can happen if the repository is created from bundle file and never pulled
 from remote.  Please run `hg pull` and build again.
 see https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code/Mercurial/Bundles\
 """)
@@ -1177,18 +1172,18 @@ see https://developer.mozilla.org/en-US/
     def install_from_recent(self, distdir):
         hg_pushheads = self._find_pushheads()
         return self._install_from_hg_pushheads(hg_pushheads, distdir)
 
     def install_from_revset(self, revset, distdir):
         revision = None
         try:
             if self._hg:
-                revision = self.run_hg('log', '--template', '{node}\n', '-r', revset,
-                                       cwd=self._topsrcdir).strip()
+                revision = subprocess.check_output([self._hg, 'log', '--template', '{node}\n',
+                                                    '-r', revset], cwd=self._topsrcdir).strip()
             elif self._git:
                 revset = subprocess.check_output([
                     self._git, 'rev-parse', '%s^{commit}' % revset],
                     stderr=open(os.devnull, 'w'), cwd=self._topsrcdir).strip()
             else:
                 # Fallback to the exception handling case from both hg and git
                 raise subprocess.CalledProcessError()
         except subprocess.CalledProcessError: