Bug 1377216 - Use substs for resolving path to Mercurial and Git; r=glandium
☠☠ backed out by b31c56eb6317 ☠ ☠
authorGregory Szorc <gps@mozilla.com>
Fri, 14 Jul 2017 17:23:34 -0700
changeset 418504 1f37aebe0f438dc0a8d05708d407c43046812bdc
parent 418503 c8931588f674c86b6b1a749dcf419c8f959f7f1a
child 418505 b5701f3ce50613dc6c88f76e177631676ddbe2a9
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1377216
milestone56.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 1377216 - Use substs for resolving path to Mercurial and Git; r=glandium We now store HG or GIT in substs. We don't need to search for binary paths. MozReview-Commit-ID: 8sSgPNLok9M
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1624,34 +1624,26 @@ class PackageFrontend(MachCommandBase):
 
         '''
         pass
 
     def _make_artifacts(self, tree=None, job=None, skip_cache=False):
         state_dir = self._mach_context.state_dir
         cache_dir = os.path.join(state_dir, 'package-frontend')
 
-        import which
-
         here = os.path.abspath(os.path.dirname(__file__))
         build_obj = MozbuildObject.from_environment(cwd=here)
 
         hg = None
         if conditions.is_hg(build_obj):
-            if self._is_windows():
-                hg = which.which('hg.exe')
-            else:
-                hg = which.which('hg')
+            hg = build_obj.substs['HG']
 
         git = None
         if conditions.is_git(build_obj):
-            if self._is_windows():
-                git = which.which('git.exe')
-            else:
-                git = which.which('git')
+            git = build_obj.substs['GIT']
 
         from mozbuild.artifacts import Artifacts
         artifacts = Artifacts(tree, self.substs, self.defines, job,
                               log=self.log, cache_dir=cache_dir,
                               skip_cache=skip_cache, hg=hg, git=git,
                               topsrcdir=self.topsrcdir)
         return artifacts