| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. 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 | 5 |
| 6 """Top-level presubmit script for GYP. | 6 """Top-level presubmit script for GYP. |
| 7 | 7 |
| 8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 9 for more details about the presubmit API built into gcl. | 9 for more details about the presubmit API built into gcl. |
| 10 """ | 10 """ |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 report.extend(input_api.canned_checks.PanProjectChecks( | 78 report.extend(input_api.canned_checks.PanProjectChecks( |
| 79 input_api, output_api)) | 79 input_api, output_api)) |
| 80 return report | 80 return report |
| 81 | 81 |
| 82 | 82 |
| 83 def CheckChangeOnCommit(input_api, output_api): | 83 def CheckChangeOnCommit(input_api, output_api): |
| 84 report = [] | 84 report = [] |
| 85 | 85 |
| 86 # Accept any year number from 2009 to the current year. | 86 # Accept any year number from 2009 to the current year. |
| 87 current_year = int(input_api.time.strftime('%Y')) | 87 current_year = int(input_api.time.strftime('%Y')) |
| 88 allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1))) | 88 allowed_years = (str(s) for s in reversed(range(2009, current_year + 1))) |
| 89 years_re = '(' + '|'.join(allowed_years) + ')' | 89 years_re = '(' + '|'.join(allowed_years) + ')' |
| 90 | 90 |
| 91 # The (c) is deprecated, but tolerate it until it's removed from all files. | 91 # The (c) is deprecated, but tolerate it until it's removed from all files. |
| 92 license = ( | 92 license = ( |
| 93 r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n' | 93 r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n' |
| 94 r'.*? Use of this source code is governed by a BSD-style license that ' | 94 r'.*? Use of this source code is governed by a BSD-style license that ' |
| 95 r'can be\n' | 95 r'can be\n' |
| 96 r'.*? found in the LICENSE file\.\n' | 96 r'.*? found in the LICENSE file\.\n' |
| 97 ) % { | 97 ) % { |
| 98 'year': years_re, | 98 'year': years_re, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 128 'linux_try', | 128 'linux_try', |
| 129 'mac_try', | 129 'mac_try', |
| 130 'win_try', | 130 'win_try', |
| 131 ] | 131 ] |
| 132 | 132 |
| 133 | 133 |
| 134 def GetPreferredTryMasters(_, change): | 134 def GetPreferredTryMasters(_, change): |
| 135 return { | 135 return { |
| 136 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS }, | 136 'client.gyp': { t: set(['defaulttests']) for t in TRYBOTS }, |
| 137 } | 137 } |
| OLD | NEW |