git-cl-upload: make it possible to exit WIP mode

The previous CL forgot that the lack of '%wip' doesn't
mark a change ready-to-review, you have to explicitly pass
'%ready' in the refspec to do that.

TBR=tandrii@chromium.org

Bug: 721836
Change-Id: Iea82222d64edf1b73fefa9bca3feec4188e35ab3
Reviewed-on: https://chromium-review.googlesource.com/551005
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
changes/05/551005/2
Aaron Gable 8 years ago committed by Commit Bot
parent 70f4e24d15
commit afd5277778

@ -3016,7 +3016,9 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
# https://gerrit-review.googlesource.com/Documentation/user-upload.html
refspec_opts = []
if not options.send_mail:
if options.send_mail:
refspec_opts.append('ready')
else:
refspec_opts.append('wip')
# TODO(tandrii): options.message should be posted as a comment

@ -1519,15 +1519,12 @@ class TestGitCl(TestCase):
'1hashPerLine\n'),
]
ref_suffix = ''
if not notify:
ref_suffix = '%wip'
ref_suffix = '%wip'
if notify:
ref_suffix = '%ready'
if title:
if ref_suffix:
ref_suffix += ',m=' + title
else:
ref_suffix = '%m=' + title
ref_suffix += ',m=' + title
if git_mirror is None:
calls += [

Loading…
Cancel
Save