Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index 5eee2ba31ceb17b5c0576109110901f98274785b..71907be309d23404e3a5b8dbda6bd682cd2febc5 100644 |
--- a/PRESUBMIT.py |
+++ b/PRESUBMIT.py |
@@ -61,10 +61,12 @@ def _CommonChecks(input_api, output_api): |
def _SkipTreeCheck(input_api, output_api): |
"""Check the env var whether we want to skip tree check. |
Only skip if src/version.cc has been updated.""" |
+ print "skip tree check?", input_api.environ.get('PRESUBMIT_TREE_CHECK') |
src_version = 'src/version.cc' |
- FilterFile = lambda file: file.LocalPath() == src_version |
- if not input_api.AffectedSourceFiles( |
- lambda file: file.LocalPath() == src_version): |
+ def FilterFile(file): |
+ print "Changed file:", file.LocalPath() |
+ return file.LocalPath() == src_version |
+ if not input_api.AffectedSourceFiles(FilterFile): |
return False |
if input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip': |
print "Skip tree check requested via environment variable." |