Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: gclient.py

Issue 17274009: Possible workaround to lower bot load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 Files 8 Files
9 .gclient : Current client configuration, written by 'config' command. 9 .gclient : Current client configuration, written by 'config' command.
10 Format is a Python script defining 'solutions', a list whose 10 Format is a Python script defining 'solutions', a list whose
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 1688
1689 1689
1690 def Parser(): 1690 def Parser():
1691 """Returns the default parser.""" 1691 """Returns the default parser."""
1692 parser = optparse.OptionParser(version='%prog ' + __version__) 1692 parser = optparse.OptionParser(version='%prog ' + __version__)
1693 # some arm boards have issues with parallel sync. 1693 # some arm boards have issues with parallel sync.
1694 if platform.machine().startswith('arm'): 1694 if platform.machine().startswith('arm'):
1695 jobs = 1 1695 jobs = 1
1696 else: 1696 else:
1697 jobs = max(8, gclient_utils.NumLocalCpus()) 1697 jobs = max(8, gclient_utils.NumLocalCpus())
1698 # cmp: 2013/06/19
1699 # Temporary workaround to lower bot-load on SVN server.
1700 if os.environ.get('CHROME_HEADLESS') == '1':
1701 jobs = 1
1698 gclientfile_default = os.environ.get('GCLIENT_FILE', '.gclient') 1702 gclientfile_default = os.environ.get('GCLIENT_FILE', '.gclient')
1699 parser.add_option('-j', '--jobs', default=jobs, type='int', 1703 parser.add_option('-j', '--jobs', default=jobs, type='int',
1700 help='Specify how many SCM commands can run in parallel; ' 1704 help='Specify how many SCM commands can run in parallel; '
1701 'defaults to number of cpu cores (%default)') 1705 'defaults to number of cpu cores (%default)')
1702 parser.add_option('-v', '--verbose', action='count', default=0, 1706 parser.add_option('-v', '--verbose', action='count', default=0,
1703 help='Produces additional output for diagnostics. Can be ' 1707 help='Produces additional output for diagnostics. Can be '
1704 'used up to three times for more logging info.') 1708 'used up to three times for more logging info.')
1705 parser.add_option('--gclientfile', dest='config_filename', 1709 parser.add_option('--gclientfile', dest='config_filename',
1706 default=None, 1710 default=None,
1707 help='Specify an alternate %s file' % gclientfile_default) 1711 help='Specify an alternate %s file' % gclientfile_default)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 1803 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
1800 print >> sys.stderr, 'Error: %s' % str(e) 1804 print >> sys.stderr, 'Error: %s' % str(e)
1801 return 1 1805 return 1
1802 1806
1803 1807
1804 if '__main__' == __name__: 1808 if '__main__' == __name__:
1805 fix_encoding.fix_encoding() 1809 fix_encoding.fix_encoding()
1806 sys.exit(Main(sys.argv[1:])) 1810 sys.exit(Main(sys.argv[1:]))
1807 1811
1808 # vim: ts=2:sw=2:tw=80:et: 1812 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698