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

Unified Diff: gcl.py

Issue 118498: Make the presubmit output much more compact. (Closed)
Patch Set: Created 11 years, 6 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 | « no previous file | presubmit_support.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcl.py
diff --git a/gcl.py b/gcl.py
index 2ea3b40131343384df1cdda5d45daf015363e0d2..ddcb205fefb1aa829eac20e46e2e122cda331c54 100755
--- a/gcl.py
+++ b/gcl.py
@@ -728,7 +728,7 @@ def GenerateDiff(files, root=None):
def OptionallyDoPresubmitChecks(change_info, committing, args):
if FilterFlag(args, "--no_presubmit") or FilterFlag(args, "--force"):
return True
- return DoPresubmitChecks(change_info, committing=committing)
+ return DoPresubmitChecks(change_info, committing, True)
def UploadCL(change_info, args):
@@ -831,10 +831,10 @@ def PresubmitCL(change_info):
return
print "*** Presubmit checks for UPLOAD would report: ***"
- DoPresubmitChecks(change_info, committing=False)
+ DoPresubmitChecks(change_info, False, False)
- print "\n\n*** Presubmit checks for COMMIT would report: ***"
- DoPresubmitChecks(change_info, committing=True)
+ print "\n*** Presubmit checks for COMMIT would report: ***"
+ DoPresubmitChecks(change_info, True, False)
def TryChange(change_info, args, swallow_exception):
@@ -1028,17 +1028,18 @@ def Lint(change_info, args):
os.chdir(previous_cwd)
-def DoPresubmitChecks(change_info, committing):
+def DoPresubmitChecks(change_info, committing, may_prompt):
"""Imports presubmit, then calls presubmit.DoPresubmitChecks."""
# Need to import here to avoid circular dependency.
import presubmit_support
root_presubmit = GetCachedFile('PRESUBMIT.py', use_root=True)
- result = presubmit_support.DoPresubmitChecks(change_info,
- committing,
+ result = presubmit_support.DoPresubmitChecks(change_info=change_info,
+ committing=committing,
verbose=False,
output_stream=sys.stdout,
input_stream=sys.stdin,
- default_presubmit=root_presubmit)
+ default_presubmit=root_presubmit,
+ may_prompt=may_prompt)
if not result:
print "\nPresubmit errors, can't continue (use --no_presubmit to bypass)"
return result
« no previous file with comments | « no previous file | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698