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

Side by Side Diff: git-try

Issue 278015: Allow specifying multiple bots with git-try.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 2 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 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 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 import getpass 6 import getpass
7 import optparse 7 import optparse
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import tempfile 10 import tempfile
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 def TryChange(args, file_list): 160 def TryChange(args, file_list):
161 """Put a patch on the try server.""" 161 """Put a patch on the try server."""
162 trychange.TryChange(args, file_list, False) 162 trychange.TryChange(args, file_list, False)
163 163
164 164
165 if __name__ == '__main__': 165 if __name__ == '__main__':
166 parser = optparse.OptionParser( 166 parser = optparse.OptionParser(
167 usage='git try [options] [branch]', 167 usage='git try [options] [branch]',
168 description='Upload the current diff of branch...HEAD to the try server.') 168 description='Upload the current diff of branch...HEAD to the try server.')
169 parser.add_option("-b", "--bot", 169 parser.add_option("-b", "--bot", action="append",
170 help="Force the use of a specific build slave (eg mac, " 170 help="Force the use of a specific build slave (eg mac, "
171 "win, or linux)") 171 "win, or linux)")
172 parser.add_option("-c", "--clobber", action="store_true", 172 parser.add_option("-c", "--clobber", action="store_true",
173 help="Make the try run use be a clobber build") 173 help="Make the try run use be a clobber build")
174 parser.add_option("-r", "--revision", 174 parser.add_option("-r", "--revision",
175 help="Specify the SVN base revision to use") 175 help="Specify the SVN base revision to use")
176 parser.add_option("--root", default="src", metavar="PATH", 176 parser.add_option("--root", default="src", metavar="PATH",
177 help="Specify the root prefix that is prepended to paths " 177 help="Specify the root prefix that is prepended to paths "
178 "in the patch") 178 "in the patch")
179 parser.add_option("--dry_run", action="store_true", 179 parser.add_option("--dry_run", action="store_true",
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 else: 240 else:
241 print "Could not get server config -- if you're within Google, " 241 print "Could not get server config -- if you're within Google, "
242 print "do you have have src-internal checked out?" 242 print "do you have have src-internal checked out?"
243 sendmsg = "Sending %s using SVN..." % '-'.join(patch_names) 243 sendmsg = "Sending %s using SVN..." % '-'.join(patch_names)
244 args.extend([ 244 args.extend([
245 '--use_svn', '--svn_repo', 245 '--use_svn', '--svn_repo',
246 'svn://svn.chromium.org/chrome-try/try', 246 'svn://svn.chromium.org/chrome-try/try',
247 ]) 247 ])
248 248
249 if options.bot: 249 for bot in options.bot:
250 args.extend(['--bot', options.bot]) 250 args.extend(['--bot', bot])
251 if options.clobber: 251 if options.clobber:
252 args.append('--clobber') 252 args.append('--clobber')
253 if options.revision: 253 if options.revision:
254 args.extend(['-r', options.revision]) 254 args.extend(['-r', options.revision])
255 if GetRietveldPatchsetNumber(): 255 if GetRietveldPatchsetNumber():
256 args.extend([ 256 args.extend([
257 '--issue', GetRietveldIssueNumber(), 257 '--issue', GetRietveldIssueNumber(),
258 '--patchset', GetRietveldPatchsetNumber(), 258 '--patchset', GetRietveldPatchsetNumber(),
259 ]) 259 ])
260 260
261 if options.dry_run: 261 if options.dry_run:
262 print open(diff_file.name, 'r').read() 262 print open(diff_file.name, 'r').read()
263 exit(0) 263 exit(0)
264 264
265 print sendmsg 265 print sendmsg
266 TryChange(args, file_list) 266 TryChange(args, file_list)
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