diff options
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 |
