OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
rmistry
2015/04/01 18:48:55
The changes in this file are identical to the chan
| |
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 |
11 # | 11 # |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
648 metavar="ISSUE", default=None, | 648 metavar="ISSUE", default=None, |
649 help="Issue number to which to add. Defaults to new issue.") | 649 help="Issue number to which to add. Defaults to new issue.") |
650 group.add_option("--base_url", action="store", dest="base_url", default=None, | 650 group.add_option("--base_url", action="store", dest="base_url", default=None, |
651 help="Base URL path for files (listed as \"Base URL\" when " | 651 help="Base URL path for files (listed as \"Base URL\" when " |
652 "viewing issue). If omitted, will be guessed automatically " | 652 "viewing issue). If omitted, will be guessed automatically " |
653 "for SVN repos and left blank for others.") | 653 "for SVN repos and left blank for others.") |
654 group.add_option("--target_ref", action="store", dest="target_ref", | 654 group.add_option("--target_ref", action="store", dest="target_ref", |
655 default=None, | 655 default=None, |
656 help="The target ref that is transitively tracked by the " | 656 help="The target ref that is transitively tracked by the " |
657 "local branch this patch comes from.") | 657 "local branch this patch comes from.") |
658 parser.add_option("--cq_dry_run", action="store_true", | |
659 help="Send the patchset to do a CQ dry run right after " | |
660 "upload.") | |
658 group.add_option("--download_base", action="store_true", | 661 group.add_option("--download_base", action="store_true", |
659 dest="download_base", default=False, | 662 dest="download_base", default=False, |
660 help="Base files will be downloaded by the server " | 663 help="Base files will be downloaded by the server " |
661 "(side-by-side diffs may not work on files with CRs).") | 664 "(side-by-side diffs may not work on files with CRs).") |
662 group.add_option("--rev", action="store", dest="revision", | 665 group.add_option("--rev", action="store", dest="revision", |
663 metavar="REV", default=None, | 666 metavar="REV", default=None, |
664 help="Base revision/branch/tree to diff against. Use " | 667 help="Base revision/branch/tree to diff against. Use " |
665 "rev1:rev2 range to review already committed changeset.") | 668 "rev1:rev2 range to review already committed changeset.") |
666 group.add_option("--send_mail", action="store_true", | 669 group.add_option("--send_mail", action="store_true", |
667 dest="send_mail", default=False, | 670 dest="send_mail", default=False, |
(...skipping 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2615 CheckReviewer(reviewer) | 2618 CheckReviewer(reviewer) |
2616 form_fields.append(("reviewers", options.reviewers)) | 2619 form_fields.append(("reviewers", options.reviewers)) |
2617 if options.cc: | 2620 if options.cc: |
2618 for cc in options.cc.split(','): | 2621 for cc in options.cc.split(','): |
2619 CheckReviewer(cc) | 2622 CheckReviewer(cc) |
2620 form_fields.append(("cc", options.cc)) | 2623 form_fields.append(("cc", options.cc)) |
2621 if options.project: | 2624 if options.project: |
2622 form_fields.append(("project", options.project)) | 2625 form_fields.append(("project", options.project)) |
2623 if options.target_ref: | 2626 if options.target_ref: |
2624 form_fields.append(("target_ref", options.target_ref)) | 2627 form_fields.append(("target_ref", options.target_ref)) |
2628 if options.cq_dry_run: | |
2629 form_fields.append(("cq_dry_run", "1")) | |
2630 form_fields.append(("commit", "1")) | |
2625 | 2631 |
2626 # Process --message, --title and --file. | 2632 # Process --message, --title and --file. |
2627 message = options.message or "" | 2633 message = options.message or "" |
2628 title = options.title or "" | 2634 title = options.title or "" |
2629 if options.file: | 2635 if options.file: |
2630 if options.message: | 2636 if options.message: |
2631 ErrorExit("Can't specify both message and message file options") | 2637 ErrorExit("Can't specify both message and message file options") |
2632 file_obj = open(options.file, 'r') | 2638 file_obj = open(options.file, 'r') |
2633 message = file_obj.read() | 2639 message = file_obj.read() |
2634 file_obj.close() | 2640 file_obj.close() |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2726 os.environ['LC_ALL'] = 'C' | 2732 os.environ['LC_ALL'] = 'C' |
2727 RealMain(sys.argv) | 2733 RealMain(sys.argv) |
2728 except KeyboardInterrupt: | 2734 except KeyboardInterrupt: |
2729 print | 2735 print |
2730 StatusUpdate("Interrupted.") | 2736 StatusUpdate("Interrupted.") |
2731 sys.exit(1) | 2737 sys.exit(1) |
2732 | 2738 |
2733 | 2739 |
2734 if __name__ == "__main__": | 2740 if __name__ == "__main__": |
2735 main() | 2741 main() |
OLD | NEW |