| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 collections | 6 import collections |
| 7 import datetime | 7 import datetime |
| 8 import json | 8 import json |
| 9 import optparse | 9 import optparse |
| 10 import os | 10 import os |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 global file_pattern_ | 508 global file_pattern_ |
| 509 if os.path.exists("drover.properties"): | 509 if os.path.exists("drover.properties"): |
| 510 print 'Using options from %s' % os.path.join( | 510 print 'Using options from %s' % os.path.join( |
| 511 os.getcwd(), 'drover.properties') | 511 os.getcwd(), 'drover.properties') |
| 512 FILE_PATTERN = file_pattern_ | 512 FILE_PATTERN = file_pattern_ |
| 513 f = open("drover.properties") | 513 f = open("drover.properties") |
| 514 exec(f) | 514 exec(f) |
| 515 f.close() | 515 f.close() |
| 516 if FILE_PATTERN: | 516 if FILE_PATTERN: |
| 517 file_pattern_ = FILE_PATTERN | 517 file_pattern_ = FILE_PATTERN |
| 518 NO_ALT_URLS = TRUE | 518 NO_ALT_URLS = True |
| 519 | 519 |
| 520 if options.revert and options.branch: | 520 if options.revert and options.branch: |
| 521 print 'Note: --branch is usually not needed for reverts.' | 521 print 'Note: --branch is usually not needed for reverts.' |
| 522 url = BRANCH_URL.replace("$branch", options.branch) | 522 url = BRANCH_URL.replace("$branch", options.branch) |
| 523 elif options.merge and options.sbranch: | 523 elif options.merge and options.sbranch: |
| 524 url = BRANCH_URL.replace("$branch", options.sbranch) | 524 url = BRANCH_URL.replace("$branch", options.sbranch) |
| 525 elif options.revert: | 525 elif options.revert: |
| 526 url = options.url or BASE_URL | 526 url = options.url or BASE_URL |
| 527 file_pattern_ = r"[ ]+([MADUC])[ ]+((/.*)/(.*))" | 527 file_pattern_ = r"[ ]+([MADUC])[ ]+((/.*)/(.*))" |
| 528 else: | 528 else: |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 | 708 |
| 709 if options.branch and options.milestone: | 709 if options.branch and options.milestone: |
| 710 option_parser.error("--branch cannot be used with --milestone") | 710 option_parser.error("--branch cannot be used with --milestone") |
| 711 return 1 | 711 return 1 |
| 712 | 712 |
| 713 return drover(options, args) | 713 return drover(options, args) |
| 714 | 714 |
| 715 | 715 |
| 716 if __name__ == "__main__": | 716 if __name__ == "__main__": |
| 717 sys.exit(main()) | 717 sys.exit(main()) |
| OLD | NEW |