Commit 844cf296 authored by Aaron Gable's avatar Aaron Gable Committed by Commit Bot

git-cl: only set WIP on first upload

It seems like some folks are confused by additional patchsets
after the first putting the change back into WIP mode. This
confusion is honestly understandable. Maybe we try only setting
it on the very first upload, and just controlling the notify
parameter for future patchsets.

Bug: 721836, 737675
Change-Id: If56e5c71e0c6b3b46c2e30ac0b6d80b878218181
Reviewed-on: https://chromium-review.googlesource.com/552779Reviewed-by: 's avatarQuinten Yearsley <qyearsley@chromium.org>
Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: 's avatarsmut <smut@google.com>
Commit-Queue: Aaron Gable <agable@chromium.org>
parent c833946a
......@@ -3016,10 +3016,17 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
# https://gerrit-review.googlesource.com/Documentation/user-upload.html
refspec_opts = []
# By default, new changes are started in WIP mode, and subsequent patchsets
# don't send email. At any time, passing --send-mail will mark the change
# ready and send email for that particular patch.
if options.send_mail:
refspec_opts.append('ready')
refspec_opts.append('notify=ALL')
else:
refspec_opts.append('wip')
if not self.GetIssue():
refspec_opts.append('wip')
else:
refspec_opts.append('notify=NONE')
# 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.
......
......@@ -1519,9 +1519,13 @@ class TestGitCl(TestCase):
'1hashPerLine\n'),
]
ref_suffix = '%wip'
if notify:
ref_suffix = '%ready'
ref_suffix = '%ready,notify=ALL'
else:
if not issue:
ref_suffix = '%wip'
else:
ref_suffix = '%notify=NONE'
if title:
ref_suffix += ',m=' + title
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment