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

Side by Side Diff: PRESUBMIT.py

Issue 3533020: pause (Closed) Base URL: http://git.chromium.org/git/chromiumos-overlay.git
Patch Set: Created 10 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS 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 """Top-level presubmit script for Chromium OS. 5 """Top-level presubmit script for Chromium OS.
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 and git cl. 8 for more details about the presubmit API built into gcl and git cl.
9 """ 9 """
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 if inconsistent: 58 if inconsistent:
59 output.append(output_api.PresubmitPromptWarning( 59 output.append(output_api.PresubmitPromptWarning(
60 'Following ebuilds are inconsistent with 9999:', items=inconsistent)) 60 'Following ebuilds are inconsistent with 9999:', items=inconsistent))
61 return output 61 return output
62 62
63 def CheckChange(input_api, output_api, committing): 63 def CheckChange(input_api, output_api, committing):
64 ebuilds = lambda x: input_api.FilterSourceFile(x, white_list=_EBUILD_FILES) 64 ebuilds = lambda x: input_api.FilterSourceFile(x, white_list=_EBUILD_FILES)
65 results = [] 65 results = []
66 results += Check9999Updated(input_api, output_api, 66 results += Check9999Updated(input_api, output_api,
67 source_file_filter=ebuilds) 67 source_file_filter=ebuilds)
68 results += CheckFoo(input_api, output_api)
68 return results 69 return results
69 70
70 def CheckChangeOnUpload(input_api, output_api): 71 def CheckChangeOnUpload(input_api, output_api):
71 return CheckChange(input_api, output_api, False) 72 return CheckChange(input_api, output_api, False)
72 73
73 def CheckChangeOnCommit(input_api, output_api): 74 def CheckChangeOnCommit(input_api, output_api):
74 return CheckChange(input_api, output_api, True) 75 return CheckChange(input_api, output_api, True)
76
77 def CheckFoo(input_api, output_api):
78 output = []
79 if input_api.change.patchset:
80 output.append(output_api.PresubmitPromptWarning(
81 'Patchset is %d' % input_api.change.patchset))
82 if input_api.change.issue:
83 output.append(output_api.PresubmitPromptWarning(
84 'Issue is %d' % input_api.change.patchset))
85
86 return output
87
OLDNEW
« 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