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

Side by Side Diff: gclient.py

Issue 3342028: Change the way to detect build slave. (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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 # TODO(maruel): Temporary workaround to disable parallel checkout on 1178 # TODO(maruel): Temporary workaround to disable parallel checkout on
1179 # buildbots until they can correctly parse its output. Uses that fact that 1179 # buildbots until they can correctly parse its output. stdout being
1180 # stdout is redirected as a signal. 1180 # redirected is not a good signal, at least on linux. Check for environment
1181 if sys.stdout.isatty(): 1181 # variable instead.
1182 if 'CHROME_HEADLESS' not in os.environ:
1182 jobs = 8 1183 jobs = 8
1183 else: 1184 else:
1184 jobs = 1 1185 jobs = 1
1185 parser.add_option('-j', '--jobs', default=jobs, type='int', 1186 parser.add_option('-j', '--jobs', default=jobs, type='int',
1186 help='Specify how many SCM commands can run in parallel; ' 1187 help='Specify how many SCM commands can run in parallel; '
1187 'default=%default') 1188 'default=%default')
1188 parser.add_option('-v', '--verbose', action='count', default=0, 1189 parser.add_option('-v', '--verbose', action='count', default=0,
1189 help='Produces additional output for diagnostics. Can be ' 1190 help='Produces additional output for diagnostics. Can be '
1190 'used up to three times for more logging info.') 1191 'used up to three times for more logging info.')
1191 parser.add_option('--gclientfile', dest='config_filename', 1192 parser.add_option('--gclientfile', dest='config_filename',
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 return CMDhelp(parser, argv) 1238 return CMDhelp(parser, argv)
1238 except gclient_utils.Error, e: 1239 except gclient_utils.Error, e:
1239 print >> sys.stderr, 'Error: %s' % str(e) 1240 print >> sys.stderr, 'Error: %s' % str(e)
1240 return 1 1241 return 1
1241 1242
1242 1243
1243 if '__main__' == __name__: 1244 if '__main__' == __name__:
1244 sys.exit(Main(sys.argv[1:])) 1245 sys.exit(Main(sys.argv[1:]))
1245 1246
1246 # vim: ts=2:sw=2:tw=80:et: 1247 # 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