Disabling bypass CQ warning message for refs/branch-heads/* of chromium/src.
Warning message appears when trying to cherry-pick into a Chromium branch,
but doesn't actually mean anything right now.
"""
About to land on 3163. Continue (y/n)? y
It seems this repository has a Commit Queue, which can test and land changes for you.
Are you sure you wish to bypass it?
Press Enter to bypass CQ, or Ctrl+C to abort
"""
We want to disable until CQ for branches is fully developed.
Bug: 753213
Change-Id: I1cdfa084a6bad1be56b85a56e94e2dd27a099b2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1518291
Commit-Queue: Karen Qian <karenqian@google.com>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 3fb31d7..face2d4 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2300,17 +2300,27 @@
raise
return data
+ def _IsCqConfigured(self):
+ detail = self._GetChangeDetail(['LABELS'])
+ if not u'Commit-Queue' in detail.get('labels', {}):
+ return False
+ # TODO(crbug/753213): Remove temporary hack
+ if ('https://chromium.googlesource.com/chromium/src' ==
+ self._changelist.GetRemoteUrl() and
+ detail['branch'].startswith('refs/branch-heads/')):
+ return False
+ return True
+
def CMDLand(self, force, bypass_hooks, verbose, parallel):
if git_common.is_dirty_git_tree('land'):
return 1
+
detail = self._GetChangeDetail(['CURRENT_REVISION', 'LABELS'])
- if u'Commit-Queue' in detail.get('labels', {}):
- if not force:
- confirm_or_exit('\nIt seems this repository has a Commit Queue, '
+ if not force and self._IsCqConfigured():
+ confirm_or_exit('\nIt seems this repository has a Commit Queue, '
'which can test and land changes for you. '
'Are you sure you wish to bypass it?\n',
action='bypass CQ')
-
differs = True
last_upload = self._GitGetBranchConfigValue('gerritsquashhash')
# Note: git diff outputs nothing if there is no diff.
@@ -2476,7 +2486,6 @@
remote, remote_branch = self.GetRemoteBranch()
branch = GetTargetRef(remote, remote_branch, options.target_branch)
-
# This may be None; default fallback value is determined in logic below.
title = options.title