Bug 1275437 - Added installing of Mercurial to Windows boostrapper. r=gps
authorNathan Hakkakzadeh <nhakkakzadeh@mozilla.com>
Thu, 26 May 2016 10:38:58 -0700
changeset 341521 cf30f2236629339e4845df17771b18f652a0ca00
parent 341520 3c18f97878791c4eb73cddbefd1102c7c1a270bd
child 341522 3952e910a66a8e98b5f3d87a4f0ba614f49ad249
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1275437
milestone49.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 1275437 - Added installing of Mercurial to Windows boostrapper. r=gps Added convenience method for installing from pip. Windows bootstrapper implements upgrade_mercurial to install mercurial from pip. MozReview-Commit-ID: ClqNA2NmQcc
python/mozboot/mozboot/windows.py
--- a/python/mozboot/mozboot/windows.py
+++ b/python/mozboot/mozboot/windows.py
@@ -45,16 +45,19 @@ class WindowsBootstrapper(BaseBootstrapp
         if not self.which('pacman.exe'):
             raise NotImplementedError('The Windows bootstrapper only works with msys2 with pacman. Get msys2 at '
                                       'http://msys2.github.io/')
         print 'Using an experimental bootstrapper for Windows.'
 
     def install_system_packages(self):
         self.pacman_install(*self.SYSTEM_PACKAGES)
 
+    def upgrade_mercurial(self, current):
+        self.pip_install('mercurial')
+
     def install_browser_packages(self):
         self.pacman_install(*self.BROWSER_PACKAGES)
 
     def install_mobile_android_packages(self):
         raise NotImplementedError('We do not support building Android on Windows. Sorry!')
 
     def install_mobile_android_artifact_mode_packages(self):
         raise NotImplementedError('We do not support building Android on Windows. Sorry!')
@@ -75,8 +78,13 @@ class WindowsBootstrapper(BaseBootstrapp
 
     def pacman_install(self, *packages):
         command = ['pacman', '--sync', '--needed']
         if self.no_interactive:
             command.append('--noconfirm')
 
         command.extend(packages)
         self.run(command)
+
+    def pip_install(self, *packages):
+        command = ['pip', 'install', '--upgrade']
+        command.extend(packages)
+        self.run(command)