Migrate git-repo to create private changes rather than drafts

Considering that some users might expect changes created with
'-d' option are not public. Private changes may be a better
choice here than work-in-progress changes.

Change-Id: I46a8fb9ae38beb41cf96d6abe82bea6db2439669
This commit is contained in:
Changcheng Xiao
2017-08-07 15:05:46 +02:00
parent 87984c6db4
commit d88f53e2b9
2 changed files with 4 additions and 13 deletions

View File

@ -152,8 +152,8 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
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.')
action='store_true', dest='private', default=False,
help='(Deprecated). If specified, upload as a private change.')
p.add_option('-p', '--private',
action='store_true', dest='private', default=False,
help='If specified, upload as a private change.')
@ -205,7 +205,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
destination = opt.dest_branch or project.dest_branch or project.revisionExpr
print('Upload project %s/ to remote branch %s%s:' %
(project.relpath, destination, ' (draft)' if opt.draft else ''))
(project.relpath, destination, ' (private)' if opt.private else ''))
print(' branch %s (%2d commit%s, %s):' % (
name,
len(commit_list),
@ -386,7 +386,6 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
branch.UploadForReview(people,
auto_topic=opt.auto_topic,
draft=opt.draft,
private=opt.private,
wip=opt.wip,
dest_branch=destination)