diff options
author | Brian Harring <ferringb@chromium.org> | 2012-07-28 15:37:04 -0700 |
---|---|---|
committer | Brian Harring <ferringb@google.com> | 2012-07-28 15:44:05 -0700 |
commit | 435370c6f0e202378ae233cf1088e499ba07e971 (patch) | |
tree | 17ef58db736d091ad62b54db0c7169b964ccb95e /subcmds/upload.py | |
parent | e8f75fa3687bfe894a4fa8e59881b7d9170d8a41 (diff) | |
download | git-repo-435370c6f0e202378ae233cf1088e499ba07e971.tar.gz |
upload: add --draft option.
Change-Id: I6967ff2f8163cd4116027b3f15ddb36875942af4
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r-- | subcmds/upload.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 69efa107..c9312973 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
@@ -134,6 +134,9 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
134 | p.add_option('--cbr', '--current-branch', | 134 | p.add_option('--cbr', '--current-branch', |
135 | dest='current_branch', action='store_true', | 135 | dest='current_branch', action='store_true', |
136 | help='Upload current git branch.') | 136 | help='Upload current git branch.') |
137 | p.add_option('-d', '--draft', | ||
138 | action='store_true', dest='draft', default=False, | ||
139 | help='If specified, upload as a draft.') | ||
137 | 140 | ||
138 | # Options relating to upload hook. Note that verify and no-verify are NOT | 141 | # Options relating to upload hook. Note that verify and no-verify are NOT |
139 | # opposites of each other, which is why they store to different locations. | 142 | # opposites of each other, which is why they store to different locations. |
@@ -324,7 +327,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
324 | key = 'review.%s.uploadtopic' % branch.project.remote.review | 327 | key = 'review.%s.uploadtopic' % branch.project.remote.review |
325 | opt.auto_topic = branch.project.config.GetBoolean(key) | 328 | opt.auto_topic = branch.project.config.GetBoolean(key) |
326 | 329 | ||
327 | branch.UploadForReview(people, auto_topic=opt.auto_topic) | 330 | branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft) |
328 | branch.uploaded = True | 331 | branch.uploaded = True |
329 | except UploadError, e: | 332 | except UploadError, e: |
330 | branch.error = e | 333 | branch.error = e |