Commit 1ce8e665 authored by maruel@chromium.org's avatar maruel@chromium.org

Do not tell people to ask me for help. I won't help them.

Write a small HowTo to help confused people by confusing checks.

R=iannucci@chromium.org
BUG=

Review URL: https://codereview.chromium.org/137653003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244717 0039d316-1c4b-4281-b951-d872f2087c98
parent ac98e29f
......@@ -1301,8 +1301,10 @@ def DoPresubmitChecks(change,
global _ASKED_FOR_FEEDBACK
# Ask for feedback one time out of 5.
if (len(results) and random.randint(0, 4) == 0 and not _ASKED_FOR_FEEDBACK):
output.write("Was the presubmit check useful? Please send feedback "
"& hate mail to maruel@chromium.org!\n")
output.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
return output
finally:
......
......@@ -815,13 +815,15 @@ def CheckChangeOnCommit(input_api, output_api):
output = presubmit.DoPresubmitChecks(
change, False, True, None, input_buf, DEFAULT_SCRIPT, False, None)
self.failIf(output.should_continue())
text = ('Running presubmit upload checks ...\n'
'Warning, no PRESUBMIT.py found.\n'
'Running default presubmit script.\n'
'\n'
'** Presubmit ERRORS **\n!!\n\n'
'Was the presubmit check useful? Please send feedback & hate mail '
'to maruel@chromium.org!\n')
text = (
'Running presubmit upload checks ...\n'
'Warning, no PRESUBMIT.py found.\n'
'Running default presubmit script.\n'
'\n'
'** Presubmit ERRORS **\n!!\n\n'
'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')
self.assertEquals(output.getvalue(), text)
def testDirectoryHandling(self):
......
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