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

Side by Side Diff: presubmit.py

Issue 113294: Add presubmit checks to look for BUG= and TEST= tags in change list descripti... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 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
« no previous file with comments | « no previous file | presubmit_canned_checks.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Enables directory-specific presubmit checks to run at upload and/or commit. 6 """Enables directory-specific presubmit checks to run at upload and/or commit.
7 """ 7 """
8 8
9 __version__ = '1.0.1' 9 __version__ = '1.0.1'
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 # Friendly names may be used for certain keys. All values for key-value pairs 43 # Friendly names may be used for certain keys. All values for key-value pairs
44 # in change descriptions (like BUG=123) can be retrieved from a change object 44 # in change descriptions (like BUG=123) can be retrieved from a change object
45 # directly as if they were attributes, e.g. change.R (or equivalently because 45 # directly as if they were attributes, e.g. change.R (or equivalently because
46 # we have a friendly name for it, change.Reviewers), change.BUG (or 46 # we have a friendly name for it, change.Reviewers), change.BUG (or
47 # change.BugIDs) and so forth. 47 # change.BugIDs) and so forth.
48 # 48 #
49 # Add to this mapping as needed/desired. 49 # Add to this mapping as needed/desired.
50 SPECIAL_KEYS = { 50 SPECIAL_KEYS = {
51 'Reviewers' : 'R', 51 'Reviewers' : 'R',
52 'BugIDs' : 'BUG', 52 'BugIDs' : 'BUG',
53 'Tested': 'TESTED' 53 'Tested': 'TESTED',
54 'Test': 'TEST'
54 } 55 }
55 56
56 57
57 class NotImplementedException(Exception): 58 class NotImplementedException(Exception):
58 """We're leaving placeholders in a bunch of places to remind us of the 59 """We're leaving placeholders in a bunch of places to remind us of the
59 design of the API, but we have not implemented all of it yet. Implement as 60 design of the API, but we have not implemented all of it yet. Implement as
60 the need arises. 61 the need arises.
61 """ 62 """
62 pass 63 pass
63 64
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 print "Found %d files." % len(files) 701 print "Found %d files." % len(files)
701 return DoPresubmitChecks(gcl.ChangeInfo(name='temp', files=files), 702 return DoPresubmitChecks(gcl.ChangeInfo(name='temp', files=files),
702 options.commit, 703 options.commit,
703 options.verbose, 704 options.verbose,
704 sys.stdout, 705 sys.stdout,
705 sys.stdin) 706 sys.stdin)
706 707
707 708
708 if __name__ == '__main__': 709 if __name__ == '__main__':
709 sys.exit(Main(sys.argv)) 710 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | presubmit_canned_checks.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698