OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Meta checkout manager supporting both Subversion and GIT.""" | 6 """Meta checkout manager supporting both Subversion and GIT.""" |
7 # Files | 7 # Files |
8 # .gclient : Current client configuration, written by 'config' command. | 8 # .gclient : Current client configuration, written by 'config' command. |
9 # Format is a Python script defining 'solutions', a list whose | 9 # Format is a Python script defining 'solutions', a list whose |
10 # entries each are maps binding the strings "name" and "url" | 10 # entries each are maps binding the strings "name" and "url" |
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1820 | 1820 |
1821 def __init__(self, **kwargs): | 1821 def __init__(self, **kwargs): |
1822 optparse.OptionParser.__init__( | 1822 optparse.OptionParser.__init__( |
1823 self, version='%prog ' + __version__, **kwargs) | 1823 self, version='%prog ' + __version__, **kwargs) |
1824 | 1824 |
1825 # Some arm boards have issues with parallel sync. | 1825 # Some arm boards have issues with parallel sync. |
1826 if platform.machine().startswith('arm'): | 1826 if platform.machine().startswith('arm'): |
1827 jobs = 1 | 1827 jobs = 1 |
1828 else: | 1828 else: |
1829 jobs = max(8, gclient_utils.NumLocalCpus()) | 1829 jobs = max(8, gclient_utils.NumLocalCpus()) |
1830 # cmp: 2013/06/19 | |
1831 # Temporary workaround to lower bot-load on SVN server. | |
1832 if os.environ.get('CHROME_HEADLESS') == '1': | |
agable
2014/02/26 22:43:12
This seems dangerous until we're entirely off of s
Ryan Tseng
2014/02/27 23:31:40
Added a condition to skip this if .update.flag is
| |
1833 jobs = 1 | |
1834 | 1830 |
1835 self.add_option( | 1831 self.add_option( |
1836 '-j', '--jobs', default=jobs, type='int', | 1832 '-j', '--jobs', default=jobs, type='int', |
1837 help='Specify how many SCM commands can run in parallel; defaults to ' | 1833 help='Specify how many SCM commands can run in parallel; defaults to ' |
1838 'number of cpu cores (%default)') | 1834 'number of cpu cores (%default)') |
1839 self.add_option( | 1835 self.add_option( |
1840 '-v', '--verbose', action='count', default=0, | 1836 '-v', '--verbose', action='count', default=0, |
1841 help='Produces additional output for diagnostics. Can be used up to ' | 1837 help='Produces additional output for diagnostics. Can be used up to ' |
1842 'three times for more logging info.') | 1838 'three times for more logging info.') |
1843 self.add_option( | 1839 self.add_option( |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1919 raise | 1915 raise |
1920 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1916 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
1921 print >> sys.stderr, 'Error: %s' % str(e) | 1917 print >> sys.stderr, 'Error: %s' % str(e) |
1922 return 1 | 1918 return 1 |
1923 | 1919 |
1924 | 1920 |
1925 if '__main__' == __name__: | 1921 if '__main__' == __name__: |
1926 sys.exit(Main(sys.argv[1:])) | 1922 sys.exit(Main(sys.argv[1:])) |
1927 | 1923 |
1928 # vim: ts=2:sw=2:tw=80:et: | 1924 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |