summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 17:20:44 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 17:20:44 +0000
commit2a8ac9c999eb57d32afc933335b0d513299f0e50 (patch)
tree7f9d7cd2f632201d9dc0d4873d3b18283ca8121e /PRESUBMIT.py
parentce703e72e7d74c7d69e62ea2495deb97b8144dfe (diff)
downloadchromium_src-2a8ac9c999eb57d32afc933335b0d513299f0e50.zip
chromium_src-2a8ac9c999eb57d32afc933335b0d513299f0e50.tar.gz
chromium_src-2a8ac9c999eb57d32afc933335b0d513299f0e50.tar.bz2
Try to annoy users with a presubmit check when they hack around .DEPS.git
R=cmp@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/8346021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 01ed0e9..fe7f79c 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -129,6 +129,19 @@ def _CheckNoNewWStrings(input_api, output_api):
'\n'.join(problems))]
+def _CheckNoDEPSGIT(input_api, output_api):
+ """Make sure .DEPS.git is never modified manually."""
+ if any(f.LocalPath().endswith('.DEPS.git') for f in
+ input_api.AffectedFiles()):
+ return [output_api.PresubmitError(
+ 'Never commit changes to .DEPS.git. This file is maintained by an\n'
+ 'automated system based on what\'s in DEPS and your changes will be\n'
+ 'overwritten.\n'
+ 'See http://code.google.com/p/chromium/wiki/UsingNewGit#Rolling_DEPS\n'
+ 'for more information')]
+ return []
+
+
def _CommonChecks(input_api, output_api):
"""Checks common to both upload and commit."""
results = []
@@ -140,6 +153,7 @@ def _CommonChecks(input_api, output_api):
_CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api))
results.extend(_CheckNoIOStreamInHeaders(input_api, output_api))
results.extend(_CheckNoNewWStrings(input_api, output_api))
+ results.extend(_CheckNoDEPSGIT(input_api, output_api))
return results