From dd78844442fef7e3613f6896dbe325cffb495a66 Mon Sep 17 00:00:00 2001 From: Andrii Shyshkalov Date: Sat, 13 Oct 2018 17:55:29 +0000 Subject: [PATCH] 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 Commit-Queue: Andrii Shyshkalov --- git_cl.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/git_cl.py b/git_cl.py index 93e21989d..4513d9559 100755 --- a/git_cl.py +++ b/git_cl.py @@ -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,