Commit 40c19421 authored by Karen Qian's avatar Karen Qian Committed by Commit Bot

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: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
parent 950df072
......@@ -2300,17 +2300,27 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
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:
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 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
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
......
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