Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: third_party/upload.py

Issue 298703003: Upload project option (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/git_cl_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 help=("Override the default account type " 622 help=("Override the default account type "
623 "(defaults to '%default', " 623 "(defaults to '%default', "
624 "valid choices are 'GOOGLE' and 'HOSTED').")) 624 "valid choices are 'GOOGLE' and 'HOSTED')."))
625 group.add_option("-j", "--number-parallel-uploads", 625 group.add_option("-j", "--number-parallel-uploads",
626 dest="num_upload_threads", default=8, 626 dest="num_upload_threads", default=8,
627 help="Number of uploads to do in parallel.") 627 help="Number of uploads to do in parallel.")
628 # Issue 628 # Issue
629 group = parser.add_option_group("Issue options") 629 group = parser.add_option_group("Issue options")
630 group.add_option("-t", "--title", action="store", dest="title", 630 group.add_option("-t", "--title", action="store", dest="title",
631 help="New issue subject or new patch set title") 631 help="New issue subject or new patch set title")
632 group.add_option("--project", action="store", dest="project",
633 help="The project the issue belongs to")
632 group.add_option("-m", "--message", action="store", dest="message", 634 group.add_option("-m", "--message", action="store", dest="message",
633 default=None, 635 default=None,
634 help="New issue description or new patch set message") 636 help="New issue description or new patch set message")
635 group.add_option("-F", "--file", action="store", dest="file", 637 group.add_option("-F", "--file", action="store", dest="file",
636 default=None, help="Read the message above from file.") 638 default=None, help="Read the message above from file.")
637 group.add_option("-r", "--reviewers", action="store", dest="reviewers", 639 group.add_option("-r", "--reviewers", action="store", dest="reviewers",
638 metavar="REVIEWERS", default=None, 640 metavar="REVIEWERS", default=None,
639 help="Add reviewers (comma separated email addresses).") 641 help="Add reviewers (comma separated email addresses).")
640 group.add_option("--cc", action="store", dest="cc", 642 group.add_option("--cc", action="store", dest="cc",
641 metavar="CC", default=None, 643 metavar="CC", default=None,
(...skipping 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 if options.email: 2591 if options.email:
2590 form_fields.append(("user", options.email)) 2592 form_fields.append(("user", options.email))
2591 if options.reviewers: 2593 if options.reviewers:
2592 for reviewer in options.reviewers.split(','): 2594 for reviewer in options.reviewers.split(','):
2593 CheckReviewer(reviewer) 2595 CheckReviewer(reviewer)
2594 form_fields.append(("reviewers", options.reviewers)) 2596 form_fields.append(("reviewers", options.reviewers))
2595 if options.cc: 2597 if options.cc:
2596 for cc in options.cc.split(','): 2598 for cc in options.cc.split(','):
2597 CheckReviewer(cc) 2599 CheckReviewer(cc)
2598 form_fields.append(("cc", options.cc)) 2600 form_fields.append(("cc", options.cc))
2601 if options.project:
2602 form_fields.append(("project", options.project))
2599 2603
2600 # Process --message, --title and --file. 2604 # Process --message, --title and --file.
2601 message = options.message or "" 2605 message = options.message or ""
2602 title = options.title or "" 2606 title = options.title or ""
2603 if options.file: 2607 if options.file:
2604 if options.message: 2608 if options.message:
2605 ErrorExit("Can't specify both message and message file options") 2609 ErrorExit("Can't specify both message and message file options")
2606 file = open(options.file, 'r') 2610 file = open(options.file, 'r')
2607 message = file.read() 2611 message = file.read()
2608 file.close() 2612 file.close()
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
2700 os.environ['LC_ALL'] = 'C' 2704 os.environ['LC_ALL'] = 'C'
2701 RealMain(sys.argv) 2705 RealMain(sys.argv)
2702 except KeyboardInterrupt: 2706 except KeyboardInterrupt:
2703 print 2707 print
2704 StatusUpdate("Interrupted.") 2708 StatusUpdate("Interrupted.")
2705 sys.exit(1) 2709 sys.exit(1)
2706 2710
2707 2711
2708 if __name__ == "__main__": 2712 if __name__ == "__main__":
2709 main() 2713 main()
OLDNEW
« no previous file with comments | « tests/git_cl_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698