From 1ce8e665e779e7e0e8fad2657bc904897c656090 Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Tue, 14 Jan 2014 15:23:00 +0000 Subject: [PATCH] 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 --- presubmit_support.py | 6 ++++-- tests/presubmit_unittest.py | 16 +++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/presubmit_support.py b/presubmit_support.py index d22c9c072..dabfbf0ba 100755 --- a/presubmit_support.py +++ b/presubmit_support.py @@ -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: diff --git a/tests/presubmit_unittest.py b/tests/presubmit_unittest.py index 7d5838053..d0d3ab4e3 100755 --- a/tests/presubmit_unittest.py +++ b/tests/presubmit_unittest.py @@ -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):