diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 19:09:08 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 19:09:08 +0000 |
commit | 7230383320eb3407930134300f1f9ed9c62d7f00 (patch) | |
tree | 63635c369c112aa6051a85b720ca751695d957f0 /PRESUBMIT.py | |
parent | 76184522f25caab6b741c6872a965c2869c12d92 (diff) | |
download | chromium_src-7230383320eb3407930134300f1f9ed9c62d7f00.zip chromium_src-7230383320eb3407930134300f1f9ed9c62d7f00.tar.gz chromium_src-7230383320eb3407930134300f1f9ed9c62d7f00.tar.bz2 |
Enforce presubmit check of try run. Add a nice message to give feedback to the right person.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/155354
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20397 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rwxr-xr-x | PRESUBMIT.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 8d4083d..cbe2d9f 100755 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -82,23 +82,22 @@ def CheckTryJobExecution(input_api, output_api): values = [item.split('|', 2) for item in connection.read().splitlines()] connection.close() statuses = map(lambda x: x[1], values) + message = None if 'failure' in statuses: failures = filter(lambda x: x[1] != 'success', values) long_text = '\n'.join("% 5s: % 7s %s" % (item[0], item[1], item[2]) for item in failures) - # TODO(maruel): Change to a PresubmitPromptWarning once the try server is - # stable enough and it seems to work fine. - message = 'You had try job failures. Are you sure you want to check-in?' - outputs.append(output_api.PresubmitNotifyResult(message=message, - long_text=long_text)) + message = 'You had try job failures. Are you sure you want to check-in?\n' elif 'pending' in statuses or len(values) != 3: long_text = '\n'.join("% 5s: % 7s %s" % (item[0], item[1], item[2]) for item in values) - # TODO(maruel): Change to a PresubmitPromptWarning once the try server is - # stable enough and it seems to work fine. - message = 'You should try the patch first (and wait for it to finish).' - outputs.append(output_api.PresubmitNotifyResult(message=message, - long_text=long_text)) + message = 'You should try the patch first (and wait for it to finish).\n' + if message: + message += ( + 'Is try server wrong or broken? Please notify maruel@chromium.org. ' + 'Thanks.\n') + outputs.append(output_api.PresubmitPromptWarning(message=message, + long_text=long_text)) except input_api.urllib2.HTTPError, e: if e.code == 404: # Fallback to no try job. |