Merge "work-in-progress and private workflow in Gerrit 2.15"
This commit is contained in:
@@ -1519,6 +1519,28 @@ def _main():
|
|||||||
"you are submitting more than one patch")
|
"you are submitting more than one patch")
|
||||||
parser.add_argument("-v", "--verbose", dest="verbose", action="store_true",
|
parser.add_argument("-v", "--verbose", dest="verbose", action="store_true",
|
||||||
help="Output more information about what's going on")
|
help="Output more information about what's going on")
|
||||||
|
|
||||||
|
wip_group = parser.add_mutually_exclusive_group()
|
||||||
|
wip_group.add_argument("-w", "--work-in-progress", dest="wip",
|
||||||
|
action="store_true",
|
||||||
|
help="Send patch as work in progress for Gerrit "
|
||||||
|
"versions >= 2.15")
|
||||||
|
wip_group.add_argument("-W", "--ready", dest="ready", action="store_true",
|
||||||
|
help="Send patch that is already work in progress"
|
||||||
|
" as ready for review. Gerrit versions >="
|
||||||
|
" 2.15")
|
||||||
|
|
||||||
|
private_group = parser.add_mutually_exclusive_group()
|
||||||
|
private_group.add_argument("-p", "--private", dest="private",
|
||||||
|
action="store_true",
|
||||||
|
help="Send patch as a private patch ready for "
|
||||||
|
"review. Gerrit versions >= 2.15")
|
||||||
|
private_group.add_argument("-P", "--remove-private", dest="remove_private",
|
||||||
|
action="store_true",
|
||||||
|
help="Send patch which already in private state"
|
||||||
|
" to normal patch."" Gerrit versions >= "
|
||||||
|
"2.15")
|
||||||
|
|
||||||
parser.add_argument("--no-custom-script", dest="custom_script",
|
parser.add_argument("--no-custom-script", dest="custom_script",
|
||||||
action="store_false", default=True,
|
action="store_false", default=True,
|
||||||
help="Do not run custom scripts.")
|
help="Do not run custom scripts.")
|
||||||
@@ -1547,7 +1569,12 @@ def _main():
|
|||||||
update=False,
|
update=False,
|
||||||
setup=False,
|
setup=False,
|
||||||
list=False,
|
list=False,
|
||||||
yes=False)
|
yes=False,
|
||||||
|
wip=False,
|
||||||
|
ready=False,
|
||||||
|
private=False,
|
||||||
|
remove_private=False)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
(top_dir, git_dir) = git_directories()
|
(top_dir, git_dir) = git_directories()
|
||||||
except GitDirectoriesException as _no_git_dir:
|
except GitDirectoriesException as _no_git_dir:
|
||||||
@@ -1672,6 +1699,18 @@ def _main():
|
|||||||
GIT_EDITOR="sed -i -e "
|
GIT_EDITOR="sed -i -e "
|
||||||
"'/^Change-Id:/d'")
|
"'/^Change-Id:/d'")
|
||||||
|
|
||||||
|
if options.wip:
|
||||||
|
cmd += '\%wip'
|
||||||
|
|
||||||
|
if options.ready:
|
||||||
|
cmd += '\%ready'
|
||||||
|
|
||||||
|
if options.private:
|
||||||
|
cmd += '\%private'
|
||||||
|
|
||||||
|
if options.remove_private:
|
||||||
|
cmd += '\%remove-private'
|
||||||
|
|
||||||
if options.dry:
|
if options.dry:
|
||||||
print("Please use the following command "
|
print("Please use the following command "
|
||||||
"to send your commits to review:\n")
|
"to send your commits to review:\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user