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

Unified Diff: build/android/devil/PRESUBMIT.py

Issue 1556983002: [Android] Make devil/ read-only for the move to catapult. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/PRESUBMIT.py
diff --git a/build/android/devil/PRESUBMIT.py b/build/android/devil/PRESUBMIT.py
index 14c0f4f136fb5b860720e0deb9fea0e48eaf767c..08bdc81710934de31b2a2da259ad6ffe5a9d15c4 100644
--- a/build/android/devil/PRESUBMIT.py
+++ b/build/android/devil/PRESUBMIT.py
@@ -72,11 +72,30 @@ def _EnsureNoPylibUse(input_api, output_api):
return []
+def _TemporarilyReadOnly(input_api, output_api):
+ # Temporarily make devil/ read-only for the move to catapult.
+ # TODO(jbudorick): Remove this after the move is complete.
+
+ def other_files(f):
+ this_presubmit_file = input_api.os_path.join(
+ input_api.PresubmitLocalPath(), 'PRESUBMIT.py')
+ return not f.AbsoluteLocalPath() == this_presubmit_file
+
+ changed_files = input_api.AffectedSourceFiles(other_files)
+ if changed_files:
+ return [output_api.PresubmitError(
+ 'devil/ is temporarily read-only while it moves to catapult. '
+ 'Questions? Contact jbudorick@',
+ items=changed_files)]
+ return []
+
+
def CommonChecks(input_api, output_api):
output = []
output += _RunPylint(input_api, output_api)
output += _RunUnitTests(input_api, output_api)
output += _EnsureNoPylibUse(input_api, output_api)
+ output += _TemporarilyReadOnly(input_api, output_api)
return output
« 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