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

Unified Diff: presubmit_canned_checks.py

Issue 118525: Update CheckChangeSvnEolStyle() to be upload-friendly. (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 | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 0a17894cb23f56cc28fd87d5cb5d2224039ebc2f..aad8b08691027b76e2a2afef824dc9b3d5322f28 100755
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -178,8 +178,12 @@ def CheckChangeSvnEolStyle(input_api, output_api, source_file_filter=None):
bad = filter(lambda f: f.scm == 'svn' and f.Property('svn:eol-style') != 'LF',
input_api.AffectedSourceFiles(source_file_filter))
if bad:
- return [output_api.PresubmitError(
- "Fix these files with svn svn:eol-style=LF", items=bad)]
+ if input_api.is_committing:
+ return [output_api.PresubmitError(
+ "Fix these files with svn svn:eol-style=LF", items=bad)]
+ else:
+ return [output_api.PresubmitNotifyResult(
+ "Fix these files with svn svn:eol-style=LF", items=bad)]
return []
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698