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

Side by Side Diff: gclient.py

Issue 3334017: Add a cheap trick to disable parallel sync on the buildbot until they are fixed. (Closed)
Patch Set: Created 10 years, 3 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
« 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 1168
1169 def Main(argv): 1169 def Main(argv):
1170 """Doesn't parse the arguments here, just find the right subcommand to 1170 """Doesn't parse the arguments here, just find the right subcommand to
1171 execute.""" 1171 execute."""
1172 try: 1172 try:
1173 # Do it late so all commands are listed. 1173 # Do it late so all commands are listed.
1174 CMDhelp.usage = ('\n\nCommands are:\n' + '\n'.join([ 1174 CMDhelp.usage = ('\n\nCommands are:\n' + '\n'.join([
1175 ' %-10s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip()) 1175 ' %-10s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip())
1176 for fn in dir(sys.modules[__name__]) if fn.startswith('CMD')])) 1176 for fn in dir(sys.modules[__name__]) if fn.startswith('CMD')]))
1177 parser = optparse.OptionParser(version='%prog ' + __version__) 1177 parser = optparse.OptionParser(version='%prog ' + __version__)
1178 parser.add_option('-j', '--jobs', default=1, type='int', 1178 # TODO(maruel): Temporary workaround to disable parallel checkout on
1179 # buildbots until they can correctly parse its output. Uses that fact that
1180 # stdout is redirected as a signal.
1181 if sys.stdout.isatty():
1182 jobs = 8
1183 else:
1184 jobs = 1
1185 parser.add_option('-j', '--jobs', default=jobs, type='int',
1179 help='Specify how many SCM commands can run in parallel; ' 1186 help='Specify how many SCM commands can run in parallel; '
1180 'default=%default') 1187 'default=%default')
1181 parser.add_option('-v', '--verbose', action='count', default=0, 1188 parser.add_option('-v', '--verbose', action='count', default=0,
1182 help='Produces additional output for diagnostics. Can be ' 1189 help='Produces additional output for diagnostics. Can be '
1183 'used up to three times for more logging info.') 1190 'used up to three times for more logging info.')
1184 parser.add_option('--gclientfile', dest='config_filename', 1191 parser.add_option('--gclientfile', dest='config_filename',
1185 default=os.environ.get('GCLIENT_FILE', '.gclient'), 1192 default=os.environ.get('GCLIENT_FILE', '.gclient'),
1186 help='Specify an alternate %default file') 1193 help='Specify an alternate %default file')
1187 # Integrate standard options processing. 1194 # Integrate standard options processing.
1188 old_parser = parser.parse_args 1195 old_parser = parser.parse_args
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 return CMDhelp(parser, argv) 1237 return CMDhelp(parser, argv)
1231 except gclient_utils.Error, e: 1238 except gclient_utils.Error, e:
1232 print >> sys.stderr, 'Error: %s' % str(e) 1239 print >> sys.stderr, 'Error: %s' % str(e)
1233 return 1 1240 return 1
1234 1241
1235 1242
1236 if '__main__' == __name__: 1243 if '__main__' == __name__:
1237 sys.exit(Main(sys.argv[1:])) 1244 sys.exit(Main(sys.argv[1:]))
1238 1245
1239 # vim: ts=2:sw=2:tw=80:et: 1246 # 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