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

Side by Side Diff: PRESUBMIT.py

Issue 6529017: Make the ~/.subversion/config check a notice instead of an error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Top-level presubmit script for Chromium. 5 """Top-level presubmit script for Chromium.
6 6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
8 for more details about the presubmit API built into gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 'http://src.chromium.org/viewvc/chrome/trunk/tools/build/slave/config\n') 94 'http://src.chromium.org/viewvc/chrome/trunk/tools/build/slave/config\n')
95 95
96 try: 96 try:
97 lines = open(path, 'r').read().splitlines() 97 lines = open(path, 'r').read().splitlines()
98 # Make sure auto-props is enabled and check for 2 Chromium standard 98 # Make sure auto-props is enabled and check for 2 Chromium standard
99 # auto-prop. 99 # auto-prop.
100 if (not '*.cc = svn:eol-style=LF' in lines or 100 if (not '*.cc = svn:eol-style=LF' in lines or
101 not '*.pdf = svn:mime-type=application/pdf' in lines or 101 not '*.pdf = svn:mime-type=application/pdf' in lines or
102 not 'enable-auto-props = yes' in lines): 102 not 'enable-auto-props = yes' in lines):
103 return [ 103 return [
104 output_api.PresubmitError( 104 output_api.PresubmitNotifyResult(
105 'It looks like you have not configured your subversion config ' 105 'It looks like you have not configured your subversion config '
106 'file or it is not up-to-date.\n' + error_msg) 106 'file or it is not up-to-date.\n' + error_msg)
107 ] 107 ]
108 except (OSError, IOError): 108 except (OSError, IOError):
109 return [ 109 return [
110 output_api.PresubmitError( 110 output_api.PresubmitNotifyResult(
111 'Can\'t find your subversion config file.\n' + error_msg) 111 'Can\'t find your subversion config file.\n' + error_msg)
112 ] 112 ]
113 return [] 113 return []
114 114
115 115
116 def _CheckConstNSObject(input_api, output_api, source_file_filter): 116 def _CheckConstNSObject(input_api, output_api, source_file_filter):
117 """Checks to make sure no objective-c files have |const NSSomeClass*|.""" 117 """Checks to make sure no objective-c files have |const NSSomeClass*|."""
118 pattern = input_api.re.compile(r'const\s+NS\w*\s*\*') 118 pattern = input_api.re.compile(r'const\s+NS\w*\s*\*')
119 files = [] 119 files = []
120 for f in input_api.AffectedSourceFiles(source_file_filter): 120 for f in input_api.AffectedSourceFiles(source_file_filter):
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 results.extend(input_api.canned_checks.CheckChangeHasBugField( 216 results.extend(input_api.canned_checks.CheckChangeHasBugField(
217 input_api, output_api)) 217 input_api, output_api))
218 results.extend(input_api.canned_checks.CheckChangeHasTestField( 218 results.extend(input_api.canned_checks.CheckChangeHasTestField(
219 input_api, output_api)) 219 input_api, output_api))
220 results.extend(_CheckSubversionConfig(input_api, output_api)) 220 results.extend(_CheckSubversionConfig(input_api, output_api))
221 return results 221 return results
222 222
223 223
224 def GetPreferredTrySlaves(): 224 def GetPreferredTrySlaves():
225 return ['win', 'linux', 'mac'] 225 return ['win', 'linux', 'mac']
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698