git-cl: upload changes in WIP unless --send-mail
Work-In-Progress is a new change flag that can be set on
Gerrit changes. While a change is in WIP mode, certain things
are different:
* It doesn't send emails except to the change owner
* The "Reply" button becomes "Start Review"
* When a change is moved out of WIP, it sends a special
"ready for review" message to any new reviewers
This is much more similar to the Rietveld model, where users
would "Publish" their changes for the reviewers to look at.
Bug: 721836
Change-Id: I3b9697e311fa176cb679ecefbfead9bb32b6afaf
Reviewed-on: https://chromium-review.googlesource.com/549015
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 3a709f5..213ff91 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3012,14 +3012,13 @@
change_desc.update_reviewers(options.reviewers, options.tbrs,
options.add_owners_to, change)
- if options.send_mail:
- if not change_desc.get_reviewers():
- DieWithError('Must specify reviewers to send email.', change_desc)
-
# Extra options that can be specified at push time. Doc:
# https://gerrit-review.googlesource.com/Documentation/user-upload.html
refspec_opts = []
+ if not options.send_mail:
+ refspec_opts.append('wip')
+
# TODO(tandrii): options.message should be posted as a comment
# if --send-email is set on non-initial upload as Rietveld used to do it.
@@ -3035,10 +3034,6 @@
# reverse on its side.
refspec_opts.append('m=' + title.replace(' ', '_'))
- # Never notify now because no one is on the review. Notify when we add
- # reviewers and CCs below.
- refspec_opts.append('notify=NONE')
-
if options.private:
refspec_opts.append('private')