| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 depot_tools. | 8 for more details about the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 long_text=error.output)] | 751 long_text=error.output)] |
| 752 | 752 |
| 753 | 753 |
| 754 def _CheckTeamTags(input_api, output_api): | 754 def _CheckTeamTags(input_api, output_api): |
| 755 """Checks that OWNERS files have consistent TEAM and COMPONENT tags.""" | 755 """Checks that OWNERS files have consistent TEAM and COMPONENT tags.""" |
| 756 checkteamtags_tool = input_api.os_path.join( | 756 checkteamtags_tool = input_api.os_path.join( |
| 757 input_api.PresubmitLocalPath(), | 757 input_api.PresubmitLocalPath(), |
| 758 'tools', 'checkteamtags', 'checkteamtags.py') | 758 'tools', 'checkteamtags', 'checkteamtags.py') |
| 759 args = [input_api.python_executable, checkteamtags_tool, | 759 args = [input_api.python_executable, checkteamtags_tool, |
| 760 '--root', input_api.change.RepositoryRoot()] | 760 '--root', input_api.change.RepositoryRoot()] |
| 761 files = [f.LocalPath() for f in input_api.AffectedFiles() | 761 files = [f.LocalPath() for f in input_api.AffectedFiles(include_deletes=False) |
| 762 if input_api.os_path.basename(f.AbsoluteLocalPath()).upper() == | 762 if input_api.os_path.basename(f.AbsoluteLocalPath()).upper() == |
| 763 'OWNERS'] | 763 'OWNERS'] |
| 764 try: | 764 try: |
| 765 if files: | 765 if files: |
| 766 input_api.subprocess.check_output(args + files) | 766 input_api.subprocess.check_output(args + files) |
| 767 return [] | 767 return [] |
| 768 except input_api.subprocess.CalledProcessError as error: | 768 except input_api.subprocess.CalledProcessError as error: |
| 769 return [output_api.PresubmitError( | 769 return [output_api.PresubmitError( |
| 770 'checkteamtags.py failed:', | 770 'checkteamtags.py failed:', |
| 771 long_text=error.output)] | 771 long_text=error.output)] |
| (...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2343 results.extend(input_api.canned_checks.CheckTreeIsOpen( | 2343 results.extend(input_api.canned_checks.CheckTreeIsOpen( |
| 2344 input_api, | 2344 input_api, |
| 2345 output_api, | 2345 output_api, |
| 2346 json_url='http://chromium-status.appspot.com/current?format=json')) | 2346 json_url='http://chromium-status.appspot.com/current?format=json')) |
| 2347 | 2347 |
| 2348 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 2348 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
| 2349 input_api, output_api)) | 2349 input_api, output_api)) |
| 2350 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 2350 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
| 2351 input_api, output_api)) | 2351 input_api, output_api)) |
| 2352 return results | 2352 return results |
| OLD | NEW |