| 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 optparse | 6 import optparse |
| 7 import os | 7 import os |
| 8 import re | 8 import re |
| 9 import string | 9 import string |
| 10 import sys | 10 import sys |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 exec(f) | 518 exec(f) |
| 519 f.close() | 519 f.close() |
| 520 if FILE_PATTERN: | 520 if FILE_PATTERN: |
| 521 file_pattern_ = FILE_PATTERN | 521 file_pattern_ = FILE_PATTERN |
| 522 | 522 |
| 523 if options.revert and options.branch: | 523 if options.revert and options.branch: |
| 524 url = BRANCH_URL.replace("$branch", options.branch) | 524 url = BRANCH_URL.replace("$branch", options.branch) |
| 525 elif options.merge and options.sbranch: | 525 elif options.merge and options.sbranch: |
| 526 url = BRANCH_URL.replace("$branch", options.sbranch) | 526 url = BRANCH_URL.replace("$branch", options.sbranch) |
| 527 elif options.revert and options.url: | 527 elif options.revert and options.url: |
| 528 url = options.url | 528 url = options.url |
| 529 file_pattern_ = r"[ ]+([MADUC])[ ]+((/.*)/(.*))" | 529 file_pattern_ = r"[ ]+([MADUC])[ ]+((/.*)/(.*))" |
| 530 else: | 530 else: |
| 531 url = TRUNK_URL | 531 url = TRUNK_URL |
| 532 | 532 |
| 533 working = options.workdir or DEFAULT_WORKING | 533 working = options.workdir or DEFAULT_WORKING |
| 534 | 534 |
| 535 if options.local: | 535 if options.local: |
| 536 working = os.getcwd() | 536 working = os.getcwd() |
| 537 if not inCheckoutRoot(working): | 537 if not inCheckoutRoot(working): |
| 538 print "'%s' appears not to be the root of a working copy" % working | 538 print "'%s' appears not to be the root of a working copy" % working |
| 539 return 1 | 539 return 1 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 687 |
| 688 if options.branch and options.milestone: | 688 if options.branch and options.milestone: |
| 689 option_parser.error("--branch cannot be used with --milestone") | 689 option_parser.error("--branch cannot be used with --milestone") |
| 690 return 1 | 690 return 1 |
| 691 | 691 |
| 692 return drover(options, args) | 692 return drover(options, args) |
| 693 | 693 |
| 694 | 694 |
| 695 if __name__ == "__main__": | 695 if __name__ == "__main__": |
| 696 sys.exit(main()) | 696 sys.exit(main()) |
| OLD | NEW |