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

Unified Diff: gcl.py

Issue 6694009: refactor presubmit parsing code from git-cl into presubmit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: 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 | « no previous file | git_cl/git_cl.py » ('j') | tests/presubmit_unittest.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcl.py
diff --git a/gcl.py b/gcl.py
index d6c46bd3f330d84c4369d0b28b77b57839cf6b25..58b6935d7f10ae6246ae9eb0aa660e88ee2075f9 100755
--- a/gcl.py
+++ b/gcl.py
@@ -1170,16 +1170,19 @@ def DoPresubmitChecks(change_info, committing, may_prompt):
change_info.GetFiles(),
change_info.issue,
change_info.patchset)
- result = presubmit_support.DoPresubmitChecks(change=change,
+ output = presubmit_support.DoPresubmitChecks(change=change,
committing=committing,
verbose=False,
output_stream=sys.stdout,
input_stream=sys.stdin,
default_presubmit=root_presubmit,
may_prompt=may_prompt)
- if not result and may_prompt:
+ if not output.should_continue() and may_prompt:
+ # TODO(dpranke): move into DoPresubmitChecks(), unify cmd line args.
print "\nPresubmit errors, can't continue (use --no_presubmit to bypass)"
- return result
+
+ # TODO(dpranke): Return the output object and make use of it.
+ return output.should_continue()
@no_args
« no previous file with comments | « no previous file | git_cl/git_cl.py » ('j') | tests/presubmit_unittest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698