Bug 1143660 - Fix continuation line indentations for visual indent. r=gps
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Wed, 18 Mar 2015 19:08:55 +0100
changeset 266195 8b2a72eea28a5d1ad15a1e046dc89fead326128e
parent 266194 9c7f64e83cd64607e67b90b07be5ed3982c90571
child 266196 5a49cab8f979968c8bbe283d559503806fbfb8e8
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1143660
milestone39.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 1143660 - Fix continuation line indentations for visual indent. r=gps
python/mozboot/mozboot/android.py
python/mozboot/mozboot/archlinux.py
python/mozboot/mozboot/base.py
python/mozboot/mozboot/bootstrap.py
python/mozboot/mozboot/debian.py
python/mozboot/mozboot/mach_commands.py
python/mozboot/mozboot/osx.py
--- a/python/mozboot/mozboot/android.py
+++ b/python/mozboot/mozboot/android.py
@@ -90,17 +90,17 @@ def list_missing_android_packages(androi
     |packages| given that are not installed.
     '''
     missing = []
 
     # There's no obvious way to see what's been installed already,
     # but packages that are installed don't appear in the list of
     # available packages.
     lines = check_output([android_tool,
-        'list', 'sdk', '--no-ui', '--extended']).splitlines()
+                          'list', 'sdk', '--no-ui', '--extended']).splitlines()
 
     # Lines look like: 'id: 59 or "extra-google-simulators"'
     for line in lines:
         is_id_line = False
         try:
             is_id_line = line.startswith("id:")
         except:
             # Some lines contain non-ASCII characters.  Ignore them.
@@ -198,18 +198,18 @@ def ensure_android_packages(android_tool
     if not missing:
         print(NOT_INSTALLING_ANDROID_PACKAGES % ', '.join(packages))
         return
 
     # This tries to install all the required Android packages.  The user
     # may be prompted to agree to the Android license.
     print(INSTALLING_ANDROID_PACKAGES % ', '.join(missing))
     subprocess.check_call([android_tool,
-        'update', 'sdk', '--no-ui',
-        '--filter', ','.join(missing)])
+                           'update', 'sdk', '--no-ui',
+                           '--filter', ','.join(missing)])
 
     # Let's verify.
     failing = list_missing_android_packages(android_tool, packages=packages)
     if failing:
         raise Exception(MISSING_ANDROID_PACKAGES % (', '.join(missing), ', '.join(failing)))
 
 
 def suggest_mozconfig(sdk_path=None, ndk_path=None):
--- a/python/mozboot/mozboot/archlinux.py
+++ b/python/mozboot/mozboot/archlinux.py
@@ -70,17 +70,17 @@ class ArchlinuxBootstrapper(BaseBootstra
         self.pacman_install(*self.SYSTEM_PACKAGES)
         self.aur_install(*self.AUR_PACKAGES)
 
     def install_browser_packages(self):
         self.pacman_install(*self.BROWSER_PACKAGES)
 
     def install_mobile_android_packages(self):
         raise NotImplementedError('Bootstrap support for mobile-android is '
-                'not yet available for Archlinux')
+                                  'not yet available for Archlinux')
 
     def _update_package_manager(self):
         self.pacman_update
 
     def upgrade_mercurial(self, current):
         self.pacman_install('mercurial')
 
     def upgrade_python(self, current):
@@ -121,19 +121,19 @@ class ArchlinuxBootstrapper(BaseBootstra
         self.run(command)
         pack = glob.glob(name + '*.tar.xz')[0]
         command = ['pacman', '-U', pack]
         self.run_as_root(command)
 
     def aur_install(self, *packages):
         path = tempfile.mkdtemp()
         print('WARNING! This script requires to install packages from the AUR '
-                'This is potentially unsecure so I recommend that you carefully '
-                'read each package description and check the sources.'
-                'These packages will be built in ' + path + '.')
+              'This is potentially unsecure so I recommend that you carefully '
+              'read each package description and check the sources.'
+              'These packages will be built in ' + path + '.')
         choice = raw_input('Do you want to continue? (yes/no) [no]')
         if choice != 'yes':
             sys.exit(1)
 
         base_dir = os.getcwd()
         os.chdir(path)
         for package in packages:
             name, _, ext = package.split('/')[-1].split('.')
--- a/python/mozboot/mozboot/base.py
+++ b/python/mozboot/mozboot/base.py
@@ -88,25 +88,26 @@ class BaseBootstrapper(object):
 
     def install_system_packages(self):
         '''
         Install packages shared by all applications. These are usually
         packages required by the development (like mercurial) or the
         build system (like autoconf).
         '''
         raise NotImplementedError('%s must implement install_system_packages()' %
-            __name__)
+                                  __name__)
 
     def install_browser_packages(self):
         '''
         Install packages required to build Firefox for Desktop (application
         'browser').
         '''
         raise NotImplementedError('Cannot bootstrap Firefox for Desktop: '
-            '%s does not yet implement install_browser_packages()' % __name__)
+                                  '%s does not yet implement install_browser_packages()' %
+                                  __name__)
 
     def suggest_browser_mozconfig(self):
         '''
         Print a message to the console detailing what the user's mozconfig
         should contain.
 
         Firefox for Desktop can in simple cases determine its build environment
         entirely from configure.
@@ -114,28 +115,29 @@ class BaseBootstrapper(object):
         pass
 
     def install_mobile_android_packages(self):
         '''
         Install packages required to build Firefox for Android (application
         'mobile/android', also known as Fennec).
         '''
         raise NotImplementedError('Cannot bootstrap Firefox for Android: '
-            '%s does not yet implement install_mobile_android_packages()' % __name__)
+                                  '%s does not yet implement install_mobile_android_packages()'
+                                  % __name__)
 
     def suggest_mobile_android_mozconfig(self):
         '''
         Print a message to the console detailing what the user's mozconfig
         should contain.
 
         Firefox for Android needs an application and an ABI set, and it needs
         paths to the Android SDK and NDK.
         '''
         raise NotImplementedError('%s does not yet implement suggest_mobile_android_mozconfig()' %
-            __name__)
+                                  __name__)
 
     def which(self, name):
         """Python implementation of which.
 
         It returns the path of an executable or None if it couldn't be found.
         """
         for path in os.environ['PATH'].split(os.pathsep):
             test = os.path.join(path, name)
@@ -271,17 +273,17 @@ class BaseBootstrapper(object):
 
         return True, our >= MODERN_MERCURIAL_VERSION, our
 
     def ensure_mercurial_modern(self):
         installed, modern, version = self.is_mercurial_modern()
 
         if not installed or modern:
             print('Your version of Mercurial (%s) is sufficiently modern.' %
-                version)
+                  version)
             return
 
         self._ensure_package_manager_updated()
         self.upgrade_mercurial(version)
 
         installed, modern, after = self.is_mercurial_modern()
 
         if installed and not modern:
@@ -300,17 +302,17 @@ class BaseBootstrapper(object):
         for test in ['python2.7', 'python']:
             python = self.which(test)
             if python:
                 break
 
         assert python
 
         info = self.check_output([python, '--version'],
-            stderr=subprocess.STDOUT)
+                                 stderr=subprocess.STDOUT)
         match = re.search('Python ([a-z0-9\.]+)', info)
         if not match:
             print('ERROR Unable to identify Python version.')
             return False, None
 
         our = LooseVersion(match.group(1))
 
         return our >= MODERN_PYTHON_VERSION, our
@@ -318,17 +320,17 @@ class BaseBootstrapper(object):
     def ensure_python_modern(self):
         modern, version = self.is_python_modern()
 
         if modern:
             print('Your version of Python (%s) is new enough.' % version)
             return
 
         print('Your version of Python (%s) is too old. Will try to upgrade.' %
-            version)
+              version)
 
         self._ensure_package_manager_updated()
         self.upgrade_python(version)
 
         modern, after = self.is_python_modern()
 
         if not modern:
             print(PYTHON_UPGRADE_FAILED % (MODERN_PYTHON_VERSION, after))
--- a/python/mozboot/mozboot/bootstrap.py
+++ b/python/mozboot/mozboot/bootstrap.py
@@ -92,17 +92,17 @@ class Bootstrapper(object):
             cls = OSXBootstrapper
             args['version'] = osx_version
 
         elif sys.platform.startswith('openbsd'):
             cls = OpenBSDBootstrapper
             args['version'] = platform.uname()[2]
 
         elif sys.platform.startswith('dragonfly') or \
-             sys.platform.startswith('freebsd'):
+                sys.platform.startswith('freebsd'):
             cls = FreeBSDBootstrapper
             args['version'] = platform.release()
             args['flavor']  = platform.system()
 
         if cls is None:
             raise NotImplementedError('Bootstrap support is not yet available '
                                       'for your OS.')
 
--- a/python/mozboot/mozboot/debian.py
+++ b/python/mozboot/mozboot/debian.py
@@ -107,27 +107,27 @@ class DebianBootstrapper(BaseBootstrappe
         self.ndk_path = os.environ.get('ANDROID_NDK_HOME', os.path.join(mozbuild_path, 'android-ndk-r8e'))
         self.sdk_url = 'https://dl.google.com/android/android-sdk_r24.0.1-linux.tgz'
         is_64bits = sys.maxsize > 2**32
         if is_64bits:
             self.ndk_url = 'https://dl.google.com/android/ndk/android-ndk-r8e-linux-x86_64.tar.bz2'
         else:
             self.ndk_url = 'https://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2'
         android.ensure_android_sdk_and_ndk(path=mozbuild_path,
-            sdk_path=self.sdk_path, sdk_url=self.sdk_url,
-            ndk_path=self.ndk_path, ndk_url=self.ndk_url)
+                                           sdk_path=self.sdk_path, sdk_url=self.sdk_url,
+                                           ndk_path=self.ndk_path, ndk_url=self.ndk_url)
 
         # 3. We expect the |android| tool to at
         # ~/.mozbuild/android-sdk-linux/tools/android.
         android_tool = os.path.join(self.sdk_path, 'tools', 'android')
         android.ensure_android_packages(android_tool=android_tool)
 
     def suggest_mobile_android_mozconfig(self):
         import android
 
         # The SDK path that mozconfig wants includes platforms/android-21.
         sdk_path = os.path.join(self.sdk_path, 'platforms', android.ANDROID_PLATFORM)
         android.suggest_mozconfig(sdk_path=sdk_path,
-            ndk_path=self.ndk_path)
+                                  ndk_path=self.ndk_path)
 
     def _update_package_manager(self):
         self.run_as_root(['apt-get', 'update'])
 
--- a/python/mozboot/mozboot/mach_commands.py
+++ b/python/mozboot/mozboot/mach_commands.py
@@ -10,14 +10,14 @@ from mach.decorators import (
 )
 
 
 @CommandProvider
 class Bootstrap(object):
     """Bootstrap system and mach for optimal development experience."""
 
     @Command('bootstrap', category='devenv',
-        description='Install required system packages for building.')
+             description='Install required system packages for building.')
     def bootstrap(self):
         from mozboot.bootstrap import Bootstrapper
 
         bootstrapper = Bootstrapper()
         bootstrapper.bootstrap()
--- a/python/mozboot/mozboot/osx.py
+++ b/python/mozboot/mozboot/osx.py
@@ -206,17 +206,17 @@ class OSXBootstrapper(BaseBootstrapper):
         # still install Xcode into any arbitrary location. We honor the
         # location of Xcode as set by xcode-select. This should also pick up
         # developer preview releases of Xcode, which can be installed into
         # paths like /Applications/Xcode5-DP6.app.
         elif self.os_version >= StrictVersion('10.7'):
             select = self.which('xcode-select')
             try:
                 output = self.check_output([select, '--print-path'],
-                    stderr=subprocess.STDOUT)
+                                           stderr=subprocess.STDOUT)
             except subprocess.CalledProcessError as e:
                 # This seems to appear on fresh OS X machines before any Xcode
                 # has been installed. It may only occur on OS X 10.9 and later.
                 if 'unable to get active developer directory' in e.output:
                     print(XCODE_NO_DEVELOPER_DIRECTORY)
                     self._install_xcode_app_store()
                     assert False # Above should exit.
 
@@ -229,23 +229,23 @@ class OSXBootstrapper(BaseBootstrapper):
                 print(XCODE_REQUIRED)
                 self._install_xcode_app_store()
                 assert False # Above should exit.
 
         # Once Xcode is installed, you need to agree to the license before you can
         # use it.
         try:
             output = self.check_output(['/usr/bin/xcrun', 'clang'],
-                stderr=subprocess.STDOUT)
+                                       stderr=subprocess.STDOUT)
         except subprocess.CalledProcessError as e:
             if 'license' in e.output:
                 xcodebuild = self.which('xcodebuild')
                 try:
                     subprocess.check_call([xcodebuild, '-license'],
-                        stderr=subprocess.STDOUT)
+                                          stderr=subprocess.STDOUT)
                 except subprocess.CalledProcessError as e:
                     if 'requires admin privileges' in e.output:
                         self.run_as_root([xcodebuild, '-license'])
 
         # Even then we're not done! We need to install the Xcode command line tools.
         # As of Mountain Lion, apparently the only way to do this is to go through a
         # menu dialog inside Xcode itself. We're not making this up.
         if self.os_version >= StrictVersion('10.7'):
@@ -315,17 +315,17 @@ class OSXBootstrapper(BaseBootstrapper):
         ]
         self._ensure_homebrew_packages(packages)
 
         installed = self.check_output([self.brew, 'list']).split()
         if self.os_version < StrictVersion('10.7') and 'llvm' not in installed:
             print(PACKAGE_MANAGER_OLD_CLANG % ('Homebrew',))
 
             subprocess.check_call([self.brew, '-v', 'install', 'llvm',
-                '--with-clang', '--all-targets'])
+                                   '--with-clang', '--all-targets'])
 
     def ensure_homebrew_mobile_android_packages(self):
         import android
 
         # If we're run from a downloaded bootstrap.py, then android-ndk.rb is
         # fetched into a temporary directory.  This finds that directory.
         import inspect
         path_to_android = os.path.abspath(os.path.dirname(inspect.getfile(android)))
@@ -457,17 +457,17 @@ class OSXBootstrapper(BaseBootstrapper):
             tf.flush()
 
             subprocess.check_call(['ruby', tf.name])
 
     def install_macports(self):
         url = MACPORTS_URL.get(self.minor_version, None)
         if not url:
             raise Exception('We do not have a MacPorts install URL for your '
-                'OS X version. You will need to install MacPorts manually.')
+                            'OS X version. You will need to install MacPorts manually.')
 
         print(PACKAGE_MANAGER_INSTALL % ('MacPorts', 'MacPorts', 'MacPorts', 'port'))
         pkg = urlopen(url=url, timeout=300).read()
         with tempfile.NamedTemporaryFile(suffix='.pkg') as tf:
             tf.write(pkg)
             tf.flush()
 
             self.run_as_root(['installer', '-pkg', tf.name, '-target', '/'])
@@ -480,17 +480,17 @@ class OSXBootstrapper(BaseBootstrapper):
             self.run_as_root([self.port, 'selfupdate'])
 
     def _upgrade_package(self, package):
         self._ensure_package_manager_updated()
 
         if self.package_manager == 'homebrew':
             try:
                 subprocess.check_output([self.brew, '-v', 'upgrade', package],
-                    stderr=subprocess.STDOUT)
+                                        stderr=subprocess.STDOUT)
             except subprocess.CalledProcessError as e:
                 if 'already installed' not in e.output:
                     raise
         else:
             assert self.package_manager == 'macports'
 
             self.run_as_root([self.port, 'upgrade', package])