| OLD | NEW |
| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 sendmsg = "Sending %s using HTTP..." % '-'.join(patch_names) | 227 sendmsg = "Sending %s using HTTP..." % '-'.join(patch_names) |
| 228 args.extend(['--use_http']) | 228 args.extend(['--use_http']) |
| 229 if config['try_server_http_host'] is not None: | 229 if config['try_server_http_host'] is not None: |
| 230 args.extend(['--host', config['try_server_http_host']]) | 230 args.extend(['--host', config['try_server_http_host']]) |
| 231 if config['try_server_http_port'] is not None: | 231 if config['try_server_http_port'] is not None: |
| 232 args.extend(['--port', config['try_server_http_port']]) | 232 args.extend(['--port', config['try_server_http_port']]) |
| 233 | 233 |
| 234 else: | 234 else: |
| 235 print "Could not get server config -- if you're within Google, " | 235 print "Could not get server config -- if you're within Google, " |
| 236 print "do you have have src-internal checked out?" | 236 print "do you have have src-internal checked out?" |
| 237 sendmsg = "Sending %s using SVN..." % patch_name | 237 sendmsg = "Sending %s using SVN..." % '-'.join(patch_names) |
| 238 args.extend([ | 238 args.extend([ |
| 239 '--use_svn', '--svn_repo', | 239 '--use_svn', '--svn_repo', |
| 240 'svn://svn.chromium.org/chrome-try/try', | 240 'svn://svn.chromium.org/chrome-try/try', |
| 241 ]) | 241 ]) |
| 242 | 242 |
| 243 if options.bot: | 243 if options.bot: |
| 244 args.extend(['--bot', options.bot]) | 244 args.extend(['--bot', options.bot]) |
| 245 if options.clobber: | 245 if options.clobber: |
| 246 args.append('--clobber') | 246 args.append('--clobber') |
| 247 if options.revision: | 247 if options.revision: |
| 248 args.extend(['-r', options.revision]) | 248 args.extend(['-r', options.revision]) |
| 249 if GetRietveldPatchsetNumber(): | 249 if GetRietveldPatchsetNumber(): |
| 250 args.extend([ | 250 args.extend([ |
| 251 '--issue', GetRietveldIssueNumber(), | 251 '--issue', GetRietveldIssueNumber(), |
| 252 '--patchset', GetRietveldPatchsetNumber(), | 252 '--patchset', GetRietveldPatchsetNumber(), |
| 253 ]) | 253 ]) |
| 254 | 254 |
| 255 if options.dry_run: | 255 if options.dry_run: |
| 256 print open(diff_file.name, 'r').read() | 256 print open(diff_file.name, 'r').read() |
| 257 exit(0) | 257 exit(0) |
| 258 | 258 |
| 259 print sendmsg | 259 print sendmsg |
| 260 TryChange(args=args) | 260 TryChange(args=args) |
| OLD | NEW |