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

Side by Side Diff: projects.py

Issue 5995005: Fix a truckload of bugs as I'm trying it the commit-queue out on real changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/commit-queue
Patch Set: rebase against trunk Created 10 years 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 | « pending_manager.py ('k') | verification/presubmit_check.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) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 """Define the supported projects.""" 5 """Define the supported projects."""
6 6
7 import os 7 import os
8 import re 8 import re
9 import sys 9 import sys
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 verifiers = [] 47 verifiers = []
48 if not no_try: 48 if not no_try:
49 verifiers.append(try_server.TryRunner( 49 verifiers.append(try_server.TryRunner(
50 'http://build.chromium.org/p/tryserver.chromium/', 50 'http://build.chromium.org/p/tryserver.chromium/',
51 'commit-bot@chromium.org', 51 'commit-bot@chromium.org',
52 # To reduce load while testing. 52 # To reduce load while testing.
53 ('linux',), 53 ('linux',),
54 ('foo',))) 54 ('foo',)))
55 verifiers.append(presubmit_check.PresubmitCheckVerifier()) 55 verifiers.append(presubmit_check.PresubmitCheckVerifier())
56 56
57 author_white_list = [r'^maruel@chromium\.org$'] 57 author_white_list = [r'^maruel\@chromium\.org$']
58 reviewers = [r'^\w+@(google\.com|chromium\.org)$'] 58 reviewers = [r'^\w+\@(google\.com|chromium\.org)$']
59 project_bases = [] 59 project_bases = []
60 for base in SVN_BASES: 60 for base in SVN_BASES:
61 project_bases.append('^%s/trunk/src$' % re.escape(base)) 61 project_bases.append('^%s/trunk/src(|/.+)$' % re.escape(base))
62 project_bases.append( 62 project_bases.append(
63 '^%s$' % re.escape('http://git.chromium.org/git/chromium.git@trunk')) 63 '^%s$' % re.escape('http://git.chromium.org/git/chromium.git@trunk'))
64 return pending_manager.PendingManager( 64 return pending_manager.PendingManager(
65 rietveld_obj, 65 rietveld_obj,
66 local_checkout, 66 local_checkout,
67 verifiers, 67 verifiers,
68 author_white_list, 68 author_white_list,
69 reviewers, 69 reviewers,
70 project_bases) 70 project_bases)
71 71
72 72
73 def _gen_build(root_dir, rietveld_obj, git_svn, no_try): 73 def _gen_build(root_dir, rietveld_obj, git_svn, no_try):
74 """Generates a PendingManager commit queue for chrome/trunk/tools/build.""" 74 """Generates a PendingManager commit queue for chrome/trunk/tools/build."""
75 return _internal_simple('build', root_dir, rietveld_obj, git_svn, no_try) 75 return _internal_simple('build', root_dir, rietveld_obj, git_svn, no_try)
76 76
77 77
78 def _gen_depot_tools(root_dir, rietveld_obj, git_svn, no_try): 78 def _gen_depot_tools(root_dir, rietveld_obj, git_svn, no_try):
79 """Generates a PendingManager commit queue for chrome/trunk/tools/depot_tools. 79 """Generates a PendingManager commit queue for chrome/trunk/tools/depot_tools.
80 """ 80 """
81 return _internal_simple( 81 return _internal_simple(
82 'depot_tools', root_dir, rietveld_obj, git_svn, no_try) 82 'depot_tools', root_dir, rietveld_obj, git_svn, no_try)
83 83
84 84
85 def _gen_commit_queue(root_dir, rietveld_obj, git_svn, no_try): 85 def _gen_commit_queue(root_dir, rietveld_obj, git_svn, no_try):
86 """Generates a PendingManager commit queue for chrome/trunk/tools/commit-queue .""" 86 """Generates a PendingManager commit queue for
87 chrome/trunk/tools/commit-queue.
88 """
87 return _internal_simple('commit-queue', root_dir, rietveld_obj, git_svn, 89 return _internal_simple('commit-queue', root_dir, rietveld_obj, git_svn,
88 no_try) 90 no_try)
89 91
90 92
91 def _internal_simple(path, root_dir, rietveld_obj, git_svn, no_try): 93 def _internal_simple(path, root_dir, rietveld_obj, git_svn, no_try):
92 """Generates a PendingManager commit queue for chrome/trunk/tools/build.""" 94 """Generates a PendingManager commit queue for chrome/trunk/tools/build."""
93 svn_creds = creds.Credentials(os.path.join(root_dir, '.svn_pwd')) 95 svn_creds = creds.Credentials(os.path.join(root_dir, '.svn_pwd'))
94 if git_svn: 96 if git_svn:
95 local_checkout = checkout.GitSvnCheckout( 97 local_checkout = checkout.GitSvnCheckout(
96 root_dir, 98 root_dir,
97 path, 99 path,
98 'commit-bot@chromium.org', 100 'commit-bot@chromium.org',
99 svn_creds.get('commit-bot@chromium.org'), 101 svn_creds.get('commit-bot@chromium.org'),
100 'svn://svn.chromium.org/chrome', 102 'svn://svn.chromium.org/chrome',
101 'trunk/tools/' + path) 103 'trunk/tools/' + path)
102 else: 104 else:
103 local_checkout = checkout.SvnCheckout( 105 local_checkout = checkout.SvnCheckout(
104 root_dir, 106 root_dir,
105 path, 107 path,
106 'commit-bot@chromium.org', 108 'commit-bot@chromium.org',
107 svn_creds.get('commit-bot@chromium.org'), 109 svn_creds.get('commit-bot@chromium.org'),
108 'svn://svn.chromium.org/chrome/trunk/tools/' + path) 110 'svn://svn.chromium.org/chrome/trunk/tools/' + path)
109 111
110 verifiers = [presubmit_check.PresubmitCheckVerifier()] 112 verifiers = [presubmit_check.PresubmitCheckVerifier()]
111 author_white_list = [r'^\w+@chromium\.org$'] 113 author_white_list = [r'^\w+\@chromium\.org$']
112 reviewers = [r'^\w+@(google\.com|chromium\.org)$'] 114 reviewers = [r'^\w+\@(google\.com|chromium\.org)$']
113 project_bases = [] 115 project_bases = []
114 for base in SVN_BASES: 116 for base in SVN_BASES:
115 project_bases.append('^%s/trunk/tools/%s$' % (re.escape(base), path)) 117 project_bases.append('^%s/trunk/tools/%s(|/.+)$' % (re.escape(base), path))
116 return pending_manager.PendingManager( 118 return pending_manager.PendingManager(
117 rietveld_obj, 119 rietveld_obj,
118 local_checkout, 120 local_checkout,
119 verifiers, 121 verifiers,
120 author_white_list, 122 author_white_list,
121 reviewers, 123 reviewers,
122 project_bases) 124 project_bases)
123 125
124 126
125 def supported_projects(): 127 def supported_projects():
126 """List the projects that can be managed by the commit queue.""" 128 """List the projects that can be managed by the commit queue."""
127 return sorted( 129 return sorted(
128 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) 130 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_'))
129 131
130 132
131 def load_project(project, root_dir, rietveld_obj, git_svn, no_try): 133 def load_project(project, root_dir, rietveld_obj, git_svn, no_try):
132 """Loads the specified project.""" 134 """Loads the specified project."""
133 return getattr(sys.modules[__name__], '_gen_' + project)( 135 return getattr(sys.modules[__name__], '_gen_' + project)(
134 root_dir, rietveld_obj, git_svn, no_try) 136 root_dir, rietveld_obj, git_svn, no_try)
OLDNEW
« no previous file with comments | « pending_manager.py ('k') | verification/presubmit_check.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698