git cl: bring label setting closer to git push in Gerrit case.

R=ehmaldonado

Bug: 877717
Change-Id: I81e574068687576cc44e41ba00ba650de8aae31b
Reviewed-on: https://chromium-review.googlesource.com/c/1242844
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
changes/44/1242844/4
Andrii Shyshkalov 7 years ago committed by Commit Bot
parent 94faf3281c
commit dd78844442

@ -1662,10 +1662,7 @@ class Changelist(object):
print_stats(git_diff_args)
ret = self.CMDUploadChange(options, git_diff_args, custom_cl_base, change)
if not ret:
if self.IsGerrit():
self.SetLabels(options.enable_auto_submit, options.use_commit_queue,
options.cq_dry_run);
else:
if not self.IsGerrit():
if options.use_commit_queue:
self.SetCQState(_CQState.COMMIT)
elif options.cq_dry_run:
@ -3284,6 +3281,8 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
msg='Self-approving for TBR',
labels={'Code-Review': score})
self.SetLabels(options.enable_auto_submit, options.use_commit_queue,
options.cq_dry_run)
return 0
def _ComputeParent(self, remote, upstream_branch, custom_cl_base, force,

Loading…
Cancel
Save