diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-08 21:33:51 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-08 21:33:51 +0000 |
commit | 4d60dcd8f09ac0d95d718932d26473c43bb469e6 (patch) | |
tree | c84690d54f57f96d87d563eb2abe1818710e2326 /ppapi/PRESUBMIT.py | |
parent | 2d10332466d39c1bea4fc445557502ac1d9299a5 (diff) | |
download | chromium_src-4d60dcd8f09ac0d95d718932d26473c43bb469e6.zip chromium_src-4d60dcd8f09ac0d95d718932d26473c43bb469e6.tar.gz chromium_src-4d60dcd8f09ac0d95d718932d26473c43bb469e6.tar.bz2 |
Pepper: Fix PRESUBMIT when deleting files.
The PRESUBMIT script for ppapi/ currently tried to open and check files, even
when they've been deleted. This makes it impossible to use the presubmit hooks
when removing certain files.
BUG=305289
Review URL: https://codereview.chromium.org/26518002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/PRESUBMIT.py')
-rw-r--r-- | ppapi/PRESUBMIT.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ppapi/PRESUBMIT.py b/ppapi/PRESUBMIT.py index 7d6a400..46038fb 100644 --- a/ppapi/PRESUBMIT.py +++ b/ppapi/PRESUBMIT.py @@ -43,7 +43,8 @@ def RunUnittests(input_api, output_api): # Verify that the files do not contain a 'TODO' in them. RE_TODO = re.compile(r'\WTODO\W', flags=re.I) def CheckTODO(input_api, output_api): - files = input_api.LocalPaths() + live_files = input_api.AffectedFiles(include_deletes=False) + files = [f.LocalPath() for f in live_files] todo = [] for filename in files: @@ -81,7 +82,8 @@ def CheckTODO(input_api, output_api): # Verify that no CPP wrappers use un-versioned PPB interface name macros. RE_UNVERSIONED_PPB = re.compile(r'\bPPB_\w+_INTERFACE\b') def CheckUnversionedPPB(input_api, output_api): - files = input_api.LocalPaths() + live_files = input_api.AffectedFiles(include_deletes=False) + files = [f.LocalPath() for f in live_files] todo = [] for filename in files: |