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

Side by Side Diff: tools/submit_try

Issue 13535005: Make submit_try accept space- or comma-separated list (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: tweak Created 7 years, 8 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/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 7
8 """ 8 """
9 submit_try: Submit a try request. 9 submit_try: Submit a try request.
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 elif arg == '-l' or arg == '--list_bots': 171 elif arg == '-l' or arg == '--list_bots':
172 print 'submit_try: Available builders:\n %s' % '\n '.join(trybots) 172 print 'submit_try: Available builders:\n %s' % '\n '.join(trybots)
173 sys.exit(0) 173 sys.exit(0)
174 elif arg == '-b' or arg == '--bot': 174 elif arg == '-b' or arg == '--bot':
175 if using_bots: 175 if using_bots:
176 Error('--bot specified multiple times.') 176 Error('--bot specified multiple times.')
177 if len(argv) < 1: 177 if len(argv) < 1:
178 Error('You must specify a builder with "--bot".') 178 Error('You must specify a builder with "--bot".')
179 using_bots = [] 179 using_bots = []
180 while argv and not argv[0].startswith('-'): 180 while argv and not argv[0].startswith('-'):
181 bot = argv.pop(0) 181 for bot in argv.pop(0).split(','):
182 if bot == ALL_BUILDERS: 182 if bot == ALL_BUILDERS:
183 if using_bots: 183 if using_bots:
184 Error('Cannot specify "all" with additional builder names.') 184 Error('Cannot specify "all" with additional builder names.')
185 using_bots = trybots 185 using_bots = trybots
186 break 186 break
187 else: 187 else:
188 if not bot in trybots: 188 if not bot in trybots:
189 Error('Unrecognized builder: %s' % bot) 189 Error('Unrecognized builder: %s' % bot)
190 using_bots.append(bot) 190 using_bots.append(bot)
191 elif arg == '-r': 191 elif arg == '-r':
192 if len(argv) < 1: 192 if len(argv) < 1:
193 Error('You must specify a revision with "-r".') 193 Error('You must specify a revision with "-r".')
194 revision = argv.pop(0) 194 revision = argv.pop(0)
195 else: 195 else:
196 if changelist or not is_svn: 196 if changelist or not is_svn:
197 Error('Unknown argument: %s' % arg) 197 Error('Unknown argument: %s' % arg)
198 changelist = arg 198 changelist = arg
199 if is_svn and not changelist: 199 if is_svn and not changelist:
200 Error('You must specify a changelist name.') 200 Error('You must specify a changelist name.')
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 is_svn = os.path.isdir('.svn') 254 is_svn = os.path.isdir('.svn')
255 255
256 # Parse and validate the command-line arguments. 256 # Parse and validate the command-line arguments.
257 args = ValidateArgs(sys.argv[1:], trybots=trybots, is_svn=is_svn) 257 args = ValidateArgs(sys.argv[1:], trybots=trybots, is_svn=is_svn)
258 258
259 # Submit the try request. 259 # Submit the try request.
260 SubmitTryRequest(args, is_svn=is_svn) 260 SubmitTryRequest(args, is_svn=is_svn)
261 261
262 262
263 if __name__ == '__main__': 263 if __name__ == '__main__':
264 sys.exit(main()) 264 sys.exit(main())
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