mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user