mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
upload: Add ready flag to remove wip
The `--wip` allow to bulk push changed as work-in-progress. This CL intend to allow the opposite opperation by removing the wip mark on the CL and set it to be ready to review Change-Id: If0743c5b14829f77be2def5a8547060d06a5648c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/342214 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: William Escande <wescande@google.com>
This commit is contained in:
parent
a8c34d1075
commit
ac76fd3e3a
@ -205,6 +205,7 @@ class ReviewableBranch(object):
|
|||||||
private=False,
|
private=False,
|
||||||
notify=None,
|
notify=None,
|
||||||
wip=False,
|
wip=False,
|
||||||
|
ready=False,
|
||||||
dest_branch=None,
|
dest_branch=None,
|
||||||
validate_certs=True,
|
validate_certs=True,
|
||||||
push_options=None):
|
push_options=None):
|
||||||
@ -217,6 +218,7 @@ class ReviewableBranch(object):
|
|||||||
private=private,
|
private=private,
|
||||||
notify=notify,
|
notify=notify,
|
||||||
wip=wip,
|
wip=wip,
|
||||||
|
ready=ready,
|
||||||
dest_branch=dest_branch,
|
dest_branch=dest_branch,
|
||||||
validate_certs=validate_certs,
|
validate_certs=validate_certs,
|
||||||
push_options=push_options)
|
push_options=push_options)
|
||||||
@ -1003,6 +1005,7 @@ class Project(object):
|
|||||||
private=False,
|
private=False,
|
||||||
notify=None,
|
notify=None,
|
||||||
wip=False,
|
wip=False,
|
||||||
|
ready=False,
|
||||||
dest_branch=None,
|
dest_branch=None,
|
||||||
validate_certs=True,
|
validate_certs=True,
|
||||||
push_options=None):
|
push_options=None):
|
||||||
@ -1072,6 +1075,8 @@ class Project(object):
|
|||||||
opts += ['private']
|
opts += ['private']
|
||||||
if wip:
|
if wip:
|
||||||
opts += ['wip']
|
opts += ['wip']
|
||||||
|
if ready:
|
||||||
|
opts += ['ready']
|
||||||
if opts:
|
if opts:
|
||||||
ref_spec = ref_spec + '%' + ','.join(opts)
|
ref_spec = ref_spec + '%' + ','.join(opts)
|
||||||
cmd.append(ref_spec)
|
cmd.append(ref_spec)
|
||||||
|
@ -190,6 +190,9 @@ Gerrit Code Review: https://www.gerritcodereview.com/
|
|||||||
p.add_option('-w', '--wip',
|
p.add_option('-w', '--wip',
|
||||||
action='store_true', dest='wip', default=False,
|
action='store_true', dest='wip', default=False,
|
||||||
help='upload as a work-in-progress change')
|
help='upload as a work-in-progress change')
|
||||||
|
p.add_option('-r', '--ready',
|
||||||
|
action='store_true', default=False,
|
||||||
|
help='mark change as ready (clears work-in-progress setting)')
|
||||||
p.add_option('-o', '--push-option',
|
p.add_option('-o', '--push-option',
|
||||||
type='string', action='append', dest='push_options',
|
type='string', action='append', dest='push_options',
|
||||||
default=[],
|
default=[],
|
||||||
@ -465,6 +468,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/
|
|||||||
private=opt.private,
|
private=opt.private,
|
||||||
notify=notify,
|
notify=notify,
|
||||||
wip=opt.wip,
|
wip=opt.wip,
|
||||||
|
ready=opt.ready,
|
||||||
dest_branch=destination,
|
dest_branch=destination,
|
||||||
validate_certs=opt.validate_certs,
|
validate_certs=opt.validate_certs,
|
||||||
push_options=opt.push_options)
|
push_options=opt.push_options)
|
||||||
|
Loading…
Reference in New Issue
Block a user