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

Unified Diff: depot_tools/presubmit.py

Issue 99072: Add an optional flag to gcl.ReadFile() so that presubmit can support CRLF PRE... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/tools/
Patch Set: Created 11 years, 8 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 | « depot_tools/gcl.py ('k') | depot_tools/tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: depot_tools/presubmit.py
===================================================================
--- depot_tools/presubmit.py (revision 14622)
+++ depot_tools/presubmit.py (working copy)
@@ -6,7 +6,7 @@
"""Enables directory-specific presubmit checks to run at upload and/or commit.
"""
-__version__ = '1.0'
+__version__ = '1.0.1'
# TODO(joi) Add caching where appropriate/needed. The API is designed to allow
# caching (between all different invocations of presubmit scripts for a given
@@ -629,7 +629,8 @@
for filename in presubmit_files:
if verbose:
print "Running %s" % filename
- presubmit_script = gcl.ReadFile(filename)
+ # Accept CRLF presubmit script.
+ presubmit_script = gcl.ReadFile(filename, 'Ur')
results += executer.ExecPresubmitScript(presubmit_script, filename)
errors = []
« no previous file with comments | « depot_tools/gcl.py ('k') | depot_tools/tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698