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

Side by Side Diff: PRESUBMIT.py

Issue 6314017: People hate to read text so put a link directly to the file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 path = join(appdata, 'Subversion', 'config') 82 path = join(appdata, 'Subversion', 'config')
83 else: 83 else:
84 home = input_api.environ.get('HOME', '') 84 home = input_api.environ.get('HOME', '')
85 if not home: 85 if not home:
86 return [output_api.PresubmitError('$HOME is not configured.')] 86 return [output_api.PresubmitError('$HOME is not configured.')]
87 path = join(home, '.subversion', 'config') 87 path = join(home, '.subversion', 'config')
88 88
89 error_msg = ( 89 error_msg = (
90 'Please look at http://dev.chromium.org/developers/coding-style to\n' 90 'Please look at http://dev.chromium.org/developers/coding-style to\n'
91 'configure your subversion configuration file. This enables automatic\n' 91 'configure your subversion configuration file. This enables automatic\n'
92 'properties to simplify the project maintenance.') 92 'properties to simplify the project maintenance.\n'
93 'Pro-tip: just download and install\n'
94 'http://src.chromium.org/viewvc/chrome/trunk/tools/build/slave/config\n')
93 95
94 try: 96 try:
95 lines = open(path, 'r').read().splitlines() 97 lines = open(path, 'r').read().splitlines()
96 # 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
97 # auto-prop. 99 # auto-prop.
98 if (not '*.cc = svn:eol-style=LF' in lines or 100 if (not '*.cc = svn:eol-style=LF' in lines or
99 not '*.pdf = svn:mime-type=application/pdf' in lines or 101 not '*.pdf = svn:mime-type=application/pdf' in lines or
100 not 'enable-auto-props = yes' in lines): 102 not 'enable-auto-props = yes' in lines):
101 return [ 103 return [
102 output_api.PresubmitError( 104 output_api.PresubmitError(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 results.extend(input_api.canned_checks.CheckChangeHasBugField( 216 results.extend(input_api.canned_checks.CheckChangeHasBugField(
215 input_api, output_api)) 217 input_api, output_api))
216 results.extend(input_api.canned_checks.CheckChangeHasTestField( 218 results.extend(input_api.canned_checks.CheckChangeHasTestField(
217 input_api, output_api)) 219 input_api, output_api))
218 results.extend(_CheckSubversionConfig(input_api, output_api)) 220 results.extend(_CheckSubversionConfig(input_api, output_api))
219 return results 221 return results
220 222
221 223
222 def GetPreferredTrySlaves(): 224 def GetPreferredTrySlaves():
223 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