Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1063)

Unified Diff: presubmit_support.py

Issue 6736018: improve logging slightly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: fix baseline of patchset Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « presubmit_canned_checks.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index e15b634f8adeb75e19f002da1dac3bcb5f0752b0..c8b4a460ce801699dbdf590bd19f0403791f3a7c 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -1040,7 +1040,10 @@ def DoPresubmitChecks(change,
if there were errors or warnings and the caller should abort.
"""
output = PresubmitOutput(input_stream, output_stream)
- output.write("Running presubmit hooks...\n")
+ if committing:
+ output.write("Running presubmit commit checks ...\n")
+ else:
+ output.write("Running presubmit upload checks ...\n")
start_time = time.time()
presubmit_files = ListRelevantPresubmitFiles(change.AbsoluteLocalPaths(True),
change.RepositoryRoot())
@@ -1072,6 +1075,7 @@ def DoPresubmitChecks(change,
else:
notifications.append(result)
+ output.write('\n')
for name, items in (('Messages', notifications),
('Warnings', warnings),
('ERRORS', errors)):
@@ -1083,10 +1087,12 @@ def DoPresubmitChecks(change,
total_time = time.time() - start_time
if total_time > 1.0:
- output.write("Presubmit checks took %.1fs to calculate.\n" % total_time)
+ output.write("Presubmit checks took %.1fs to calculate.\n\n" % total_time)
- if not errors and warnings:
- if may_prompt:
+ if not errors:
+ if not warnings:
+ output.write('Presubmit checks passed.\n')
+ elif may_prompt:
output.prompt_yes_no('There were presubmit warnings. '
'Are you sure you wish to continue? (y/N): ')
else:
« no previous file with comments | « presubmit_canned_checks.py ('k') | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698