Discontinue support for draft workflow

As of gerrit 2.15 and later, draft workflow is replaced with
work-in-progress and private workflow. See this CL: [1] and this
issue upstream: [2].

Even though support for draft worklfow was removed, the drafts magic
draft option was preserved, and is mapped to creation of the private
change when pushed first time, or creation of change edit on subsequent
pushes. These behaviour was alaways controvesial, but was kept in place
because 2 major Gerrit clients: repo and git-review were still
referencing drafts magic branch. In upcoming gerrit releases the support
for drafts magic branch option is discontinued, and thus removed from
both repo and git-review: [3].

[1] https://gerrit-review.googlesource.com/c/gerrit/+/97230
[2] https://crbug.com/gerrit/6880
[3] https://gerrit-review.googlesource.com/c/gerrit/+/238898

Sem-Ver: api-break
Change-Id: I08a590d42e1ebaa230da960cd192c0b1df528332
This commit is contained in:
David Ostrovsky 2019-09-28 12:12:47 +02:00 committed by David Pursehouse
parent 5afa906ef5
commit 02491ca845
3 changed files with 1 additions and 13 deletions

View File

@ -101,7 +101,5 @@ The name of the script is $action-review where action can be:
* post - run at the end after the review was sent.
* draft - run when in draft mode.
If the script returns with an exit status different than zero, git-review will
exit with the custom shell exit code ``71``.

View File

@ -161,8 +161,6 @@ Indicate that you do, in fact, understand if you are submitting more than
one patch.
.It Fl v , Fl \-verbose
Turns on more verbose output.
.It Fl D , Fl \-draft
Submit review as a draft. Requires Gerrit 2.3 or newer.
.It Fl R , Fl \-no\-rebase
Do not automatically perform a rebase before submitting the change to
Gerrit.
@ -178,7 +176,7 @@ Enable or disable a color output. Default is "auto".
Same thing as \-\-color=never.
.It Fl \-no\-custom\-script
Do not run scripts, installed as hooks/{action}-review, where action
is one of "pre", "draft", or "post".
is one of "pre" or "post".
.It Fl \-track
Choose the branch to submit the change against (and, if
rebasing, to rebase against) from the branch being tracked

View File

@ -1423,8 +1423,6 @@ review.
parser.add_argument("--reviewers", nargs="+",
help="Add reviewers to uploaded patch sets.")
parser.add_argument("-D", "--draft", dest="draft", action="store_true",
help="Submit review as a draft")
parser.add_argument("-n", "--dry-run", dest="dry", action="store_true",
help="Don't actually submit the branch for review")
parser.add_argument("-i", "--new-changeid", dest="regenerate",
@ -1553,7 +1551,6 @@ review.
parser.add_argument("branch", nargs="?")
parser.set_defaults(dry=False,
draft=False,
verbose=False,
update=False,
setup=False,
@ -1661,11 +1658,6 @@ review.
ref = "for"
if options.draft:
ref = "drafts"
if options.custom_script:
run_custom_script("draft")
cmd = ("git push --no-follow-tags %s HEAD:refs/%s/%s" %
(remote, ref, branch))
push_options = []