Update presubmit feedback message for Cog

We shouldn't be suggesting people run unsupported commands on cog.

Change-Id: I0a15b825b32a3f9bc40c65e0b51be33f06de54ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5782965
Auto-Submit: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Yiwei Zhang <yiwzhang@google.com>
This commit is contained in:
Gavin Mak
2024-08-15 16:37:54 +00:00
committed by LUCI CQ
parent 39ca85acf5
commit 37a737c1bc
2 changed files with 12 additions and 5 deletions

View File

@@ -2020,11 +2020,18 @@ def DoPresubmitChecks(change,
global _ASKED_FOR_FEEDBACK
# Ask for feedback one time out of 5.
if (results and random.randint(0, 4) == 0 and not _ASKED_FOR_FEEDBACK):
sys.stdout.write(
'Was the presubmit check useful? If not, run "git cl presubmit -v"\n'
'to figure out which PRESUBMIT.py was run, then run git blame\n'
'on the file to figure out who to ask for help.\n')
_ASKED_FOR_FEEDBACK = True
if gclient_utils.IsEnvCog():
sys.stdout.write(
'Was the presubmit check useful? If not, view the file\'s\n'
'blame on Code Search to figure out who to ask for help.\n')
else:
sys.stdout.write(
'Was the presubmit check useful? If not, run '
'"git cl presubmit -v"\n'
'to figure out which PRESUBMIT.py was run, then run '
'"git blame"\n'
'on the file to figure out who to ask for help.\n')
return 1 if presubmits_failed else 0