diff options
| author | Changcheng Xiao <xchangcheng@google.com> | 2017-08-02 16:55:03 +0200 |
|---|---|---|
| committer | Changcheng Xiao <xchangcheng@google.com> | 2017-08-07 15:02:39 +0200 |
| commit | 87984c6db4962043c2b9e5a5a4a30eaf6d066077 (patch) | |
| tree | ab8bb74e27b845419ef57048044d758ff3eb1d3f /subcmds/upload.py | |
| parent | ffc1401327b8240badd6fc62c6f85beca0350b44 (diff) | |
| download | git-repo-87984c6db4962043c2b9e5a5a4a30eaf6d066077.tar.gz | |
Add options for git-repo to support private and wip changes
This change adds options for git-repo tool to support private
changes and work-in-progress changes.
Change-Id: I343491f5949f06f1580d53f9cc0dee2dca09130f
Diffstat (limited to 'subcmds/upload.py')
| -rw-r--r-- | subcmds/upload.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index fa80c3d2..61b18bc2 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -154,6 +154,12 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
| 154 | p.add_option('-d', '--draft', | 154 | p.add_option('-d', '--draft', |
| 155 | action='store_true', dest='draft', default=False, | 155 | action='store_true', dest='draft', default=False, |
| 156 | help='If specified, upload as a draft.') | 156 | help='If specified, upload as a draft.') |
| 157 | p.add_option('-p', '--private', | ||
| 158 | action='store_true', dest='private', default=False, | ||
| 159 | help='If specified, upload as a private change.') | ||
| 160 | p.add_option('-w', '--wip', | ||
| 161 | action='store_true', dest='wip', default=False, | ||
| 162 | help='If specified, upload as a work-in-progress change.') | ||
| 157 | p.add_option('-D', '--destination', '--dest', | 163 | p.add_option('-D', '--destination', '--dest', |
| 158 | type='string', action='store', dest='dest_branch', | 164 | type='string', action='store', dest='dest_branch', |
| 159 | metavar='BRANCH', | 165 | metavar='BRANCH', |
| @@ -378,7 +384,12 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
| 378 | branch.uploaded = False | 384 | branch.uploaded = False |
| 379 | continue | 385 | continue |
| 380 | 386 | ||
| 381 | branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=destination) | 387 | branch.UploadForReview(people, |
| 388 | auto_topic=opt.auto_topic, | ||
| 389 | draft=opt.draft, | ||
| 390 | private=opt.private, | ||
| 391 | wip=opt.wip, | ||
| 392 | dest_branch=destination) | ||
| 382 | branch.uploaded = True | 393 | branch.uploaded = True |
| 383 | except UploadError as e: | 394 | except UploadError as e: |
| 384 | branch.error = e | 395 | branch.error = e |
