| OLD | NEW |
| 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 raise Exception('Failed to submit try request: %s' % ( | 269 raise Exception('Failed to submit try request: %s' % ( |
| 270 proc.communicate()[0])) | 270 proc.communicate()[0])) |
| 271 print proc.communicate()[0] | 271 print proc.communicate()[0] |
| 272 else: | 272 else: |
| 273 # First, find depot_tools. This is needed to import trychange. | 273 # First, find depot_tools. This is needed to import trychange. |
| 274 sys.path.append(FindDepotTools()) | 274 sys.path.append(FindDepotTools()) |
| 275 import trychange | 275 import trychange |
| 276 try_args = ['--use_svn', | 276 try_args = ['--use_svn', |
| 277 '--svn_repo', GetTryRepo(), | 277 '--svn_repo', GetTryRepo(), |
| 278 '--root', GetCheckoutRoot(is_svn), | 278 '--root', GetCheckoutRoot(is_svn), |
| 279 '--bot', botlist] | 279 '--bot', botlist, |
| 280 '--patchlevel', '0'] |
| 280 if args.revision: | 281 if args.revision: |
| 281 try_args.extend(['-r', args.revision]) | 282 try_args.extend(['-r', args.revision]) |
| 282 trychange.TryChange(try_args, None, False) | 283 trychange.TryChange(try_args, None, False) |
| 283 | 284 |
| 284 | 285 |
| 285 def main(): | 286 def main(): |
| 286 # Retrieve the list of active try builders from the build master. | 287 # Retrieve the list of active try builders from the build master. |
| 287 trybots = RetrieveTrybotList(json_filename='trybots') | 288 trybots = RetrieveTrybotList(json_filename='trybots') |
| 288 | 289 |
| 289 # Determine if we're in an SVN checkout. | 290 # Determine if we're in an SVN checkout. |
| 290 is_svn = os.path.isdir('.svn') | 291 is_svn = os.path.isdir('.svn') |
| 291 | 292 |
| 292 # Parse and validate the command-line arguments. | 293 # Parse and validate the command-line arguments. |
| 293 args = ValidateArgs(sys.argv[1:], trybots=trybots, is_svn=is_svn) | 294 args = ValidateArgs(sys.argv[1:], trybots=trybots, is_svn=is_svn) |
| 294 | 295 |
| 295 # Submit the try request. | 296 # Submit the try request. |
| 296 SubmitTryRequest(args, is_svn=is_svn) | 297 SubmitTryRequest(args, is_svn=is_svn) |
| 297 | 298 |
| 298 | 299 |
| 299 if __name__ == '__main__': | 300 if __name__ == '__main__': |
| 300 sys.exit(main()) | 301 sys.exit(main()) |
| OLD | NEW |