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

Side by Side Diff: chrome/common/extensions/docs/server2/PRESUBMIT.py

Issue 14247024: Devserver: allow SubversionFileSystem to be pinned to a specific rev on construction (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stop cron rendering samples Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 """Presubmit script for changes affecting extensions docs server 5 """Presubmit script for changes affecting extensions docs server
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 gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 19 matching lines...) Expand all
30 import build_server 30 import build_server
31 build_server.main() 31 build_server.main()
32 finally: 32 finally:
33 sys.path = SYS_PATH 33 sys.path = SYS_PATH
34 34
35 WHITELIST = [ r'.+_test.py$' ] 35 WHITELIST = [ r'.+_test.py$' ]
36 # The integration tests are selectively run from the PRESUBMIT in 36 # The integration tests are selectively run from the PRESUBMIT in
37 # chrome/common/extensions. 37 # chrome/common/extensions.
38 BLACKLIST = [ r'integration_test.py$' ] 38 BLACKLIST = [ r'integration_test.py$' ]
39 39
40 def _WarnIfAppYamlHasntChanged(input_api, output_api):
41 if any(path.endswith('app.yaml') for path in input_api.LocalPaths()):
42 return []
43 return [output_api.PresubmitPromptOrNotify('''
44 **************************************************
45 CHANGE DETECTED IN SERVER2 WITHOUT APP.YAML UPDATE
46 **************************************************
47 Maybe this is ok? Follow this simple guide:
48
49 Q: Does this change any data that might get stored?
50 * Did you add/remove/update a field to a data source?
51 * Did you add/remove/update some data that gets sent to templates?
52 * Is this change to support a new feature in the templates?
53 * Does this change include changes to templates?
54 Yes? Bump the middle version, i.e. 2-5-2 -> 2-6-2.
55 THIS WILL CAUSE THE CURRENTLY RUNNING SERVER TO STOP UPDATING.
56 PUSH THE NEW VERSION ASAP.
57 No? Continue.
58
59 Q: Is this a non-trivial change to the server?
60 Yes? Bump the end version, i.e. 2-5-2 -> 2-5-3.
61 No? Are you sure? How much do you bet? This can't be rolled back...
方觉(Fang Jue) 2013/05/10 08:49:17 Different versions have separate object stores, wh
not at google - send to devlin 2013/05/10 17:49:58 Yep, this comment is *slightly* misleading. In a f
62
63 Q: Is this a spelling correction? New test? Better comments?
64 Yes? Ok fine. Ignore this warning.
65 No? I guess this presubmit check doesn't work.
66 ''')]
67
68 def _RunPresubmit(input_api, output_api):
69 return (
70 _WarnIfAppYamlHasntChanged(input_api, output_api) +
71 input_api.canned_checks.RunUnitTestsInDirectory(
72 input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST)
73 )
74
40 def CheckChangeOnUpload(input_api, output_api): 75 def CheckChangeOnUpload(input_api, output_api):
41 return input_api.canned_checks.RunUnitTestsInDirectory( 76 return _RunPresubmit(input_api, output_api)
42 input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST)
43 77
44 def CheckChangeOnCommit(input_api, output_api): 78 def CheckChangeOnCommit(input_api, output_api):
45 return input_api.canned_checks.RunUnitTestsInDirectory( 79 return _RunPresubmit(input_api, output_api)
46 input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698