From 435370c6f0e202378ae233cf1088e499ba07e971 Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Sat, 28 Jul 2012 15:37:04 -0700 Subject: upload: add --draft option. Change-Id: I6967ff2f8163cd4116027b3f15ddb36875942af4 --- subcmds/upload.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'subcmds/upload.py') 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/ p.add_option('--cbr', '--current-branch', dest='current_branch', action='store_true', help='Upload current git branch.') + p.add_option('-d', '--draft', + action='store_true', dest='draft', default=False, + help='If specified, upload as a draft.') # Options relating to upload hook. Note that verify and no-verify are NOT # 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/ key = 'review.%s.uploadtopic' % branch.project.remote.review opt.auto_topic = branch.project.config.GetBoolean(key) - branch.UploadForReview(people, auto_topic=opt.auto_topic) + branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft) branch.uploaded = True except UploadError, e: branch.error = e -- cgit v1.2.3-54-g00ecf