| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # coding: utf-8 | 2 # coding: utf-8 |
| 3 # | 3 # |
| 4 # Copyright 2007 Google Inc. | 4 # Copyright 2007 Google Inc. |
| 5 # | 5 # |
| 6 # Licensed under the Apache License, Version 2.0 (the "License"); | 6 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 # you may not use this file except in compliance with the License. | 7 # you may not use this file except in compliance with the License. |
| 8 # You may obtain a copy of the License at | 8 # You may obtain a copy of the License at |
| 9 # | 9 # |
| 10 # http://www.apache.org/licenses/LICENSE-2.0 | 10 # http://www.apache.org/licenses/LICENSE-2.0 |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 metavar="ISSUE", default=None, | 647 metavar="ISSUE", default=None, |
| 648 help="Issue number to which to add. Defaults to new issue.") | 648 help="Issue number to which to add. Defaults to new issue.") |
| 649 group.add_option("--base_url", action="store", dest="base_url", default=None, | 649 group.add_option("--base_url", action="store", dest="base_url", default=None, |
| 650 help="Base URL path for files (listed as \"Base URL\" when " | 650 help="Base URL path for files (listed as \"Base URL\" when " |
| 651 "viewing issue). If omitted, will be guessed automatically " | 651 "viewing issue). If omitted, will be guessed automatically " |
| 652 "for SVN repos and left blank for others.") | 652 "for SVN repos and left blank for others.") |
| 653 group.add_option("--target_ref", action="store", dest="target_ref", | 653 group.add_option("--target_ref", action="store", dest="target_ref", |
| 654 default=None, | 654 default=None, |
| 655 help="The target ref that is transitively tracked by the " | 655 help="The target ref that is transitively tracked by the " |
| 656 "local branch this patch comes from.") | 656 "local branch this patch comes from.") |
| 657 parser.add_option("--cq_dry_run", action="store_true", |
| 658 help="Send the patchset to do a CQ dry run right after " |
| 659 "upload.") |
| 657 group.add_option("--download_base", action="store_true", | 660 group.add_option("--download_base", action="store_true", |
| 658 dest="download_base", default=False, | 661 dest="download_base", default=False, |
| 659 help="Base files will be downloaded by the server " | 662 help="Base files will be downloaded by the server " |
| 660 "(side-by-side diffs may not work on files with CRs).") | 663 "(side-by-side diffs may not work on files with CRs).") |
| 661 group.add_option("--rev", action="store", dest="revision", | 664 group.add_option("--rev", action="store", dest="revision", |
| 662 metavar="REV", default=None, | 665 metavar="REV", default=None, |
| 663 help="Base revision/branch/tree to diff against. Use " | 666 help="Base revision/branch/tree to diff against. Use " |
| 664 "rev1:rev2 range to review already committed changeset.") | 667 "rev1:rev2 range to review already committed changeset.") |
| 665 group.add_option("--send_mail", action="store_true", | 668 group.add_option("--send_mail", action="store_true", |
| 666 dest="send_mail", default=False, | 669 dest="send_mail", default=False, |
| (...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2604 CheckReviewer(reviewer) | 2607 CheckReviewer(reviewer) |
| 2605 form_fields.append(("reviewers", options.reviewers)) | 2608 form_fields.append(("reviewers", options.reviewers)) |
| 2606 if options.cc: | 2609 if options.cc: |
| 2607 for cc in options.cc.split(','): | 2610 for cc in options.cc.split(','): |
| 2608 CheckReviewer(cc) | 2611 CheckReviewer(cc) |
| 2609 form_fields.append(("cc", options.cc)) | 2612 form_fields.append(("cc", options.cc)) |
| 2610 if options.project: | 2613 if options.project: |
| 2611 form_fields.append(("project", options.project)) | 2614 form_fields.append(("project", options.project)) |
| 2612 if options.target_ref: | 2615 if options.target_ref: |
| 2613 form_fields.append(("target_ref", options.target_ref)) | 2616 form_fields.append(("target_ref", options.target_ref)) |
| 2617 if options.cq_dry_run: |
| 2618 form_fields.append(("cq_dry_run", "1")) |
| 2619 form_fields.append(("commit", "1")) |
| 2614 | 2620 |
| 2615 # Process --message, --title and --file. | 2621 # Process --message, --title and --file. |
| 2616 message = options.message or "" | 2622 message = options.message or "" |
| 2617 title = options.title or "" | 2623 title = options.title or "" |
| 2618 if options.file: | 2624 if options.file: |
| 2619 if options.message: | 2625 if options.message: |
| 2620 ErrorExit("Can't specify both message and message file options") | 2626 ErrorExit("Can't specify both message and message file options") |
| 2621 file = open(options.file, 'r') | 2627 file = open(options.file, 'r') |
| 2622 message = file.read() | 2628 message = file.read() |
| 2623 file.close() | 2629 file.close() |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 os.environ['LC_ALL'] = 'C' | 2721 os.environ['LC_ALL'] = 'C' |
| 2716 RealMain(sys.argv) | 2722 RealMain(sys.argv) |
| 2717 except KeyboardInterrupt: | 2723 except KeyboardInterrupt: |
| 2718 print | 2724 print |
| 2719 StatusUpdate("Interrupted.") | 2725 StatusUpdate("Interrupted.") |
| 2720 sys.exit(1) | 2726 sys.exit(1) |
| 2721 | 2727 |
| 2722 | 2728 |
| 2723 if __name__ == "__main__": | 2729 if __name__ == "__main__": |
| 2724 main() | 2730 main() |
| OLD | NEW |