| OLD | NEW |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 """Define the supported projects.""" | 4 """Define the supported projects.""" |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 import find_depot_tools # pylint: disable=W0611 | 10 import find_depot_tools # pylint: disable=W0611 |
| 11 import checkout | 11 import checkout |
| 12 | 12 |
| 13 import committer_list | 13 import committer_list |
| 14 import creds | 14 import creds |
| 15 import errors | 15 import errors |
| 16 import pending_manager | 16 import pending_manager |
| 17 from post_processors import chromium_copyright |
| 17 from verification import presubmit_check | 18 from verification import presubmit_check |
| 18 from verification import project_base | 19 from verification import project_base |
| 19 from verification import reviewer_lgtm | 20 from verification import reviewer_lgtm |
| 20 from verification import tree_status | 21 from verification import tree_status |
| 21 from verification import try_server | 22 from verification import try_server |
| 22 | 23 |
| 23 | 24 |
| 24 # It's tricky here because 'chrome' is remapped to 'svn' on src.chromium.org but | 25 # It's tricky here because 'chrome' is remapped to 'svn' on src.chromium.org but |
| 25 # the other repositories keep their repository name. So don't list it here. | 26 # the other repositories keep their repository name. So don't list it here. |
| 26 SVN_HOST_ALIASES = [ | 27 SVN_HOST_ALIASES = [ |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ) | 100 ) |
| 100 verifiers.append(try_server.TryRunner( | 101 verifiers.append(try_server.TryRunner( |
| 101 'http://build.chromium.org/p/tryserver.chromium/', | 102 'http://build.chromium.org/p/tryserver.chromium/', |
| 102 user, | 103 user, |
| 103 builders, | 104 builders, |
| 104 tests, | 105 tests, |
| 105 ['--root', 'src'])) | 106 ['--root', 'src'])) |
| 106 | 107 |
| 107 verifiers.append(tree_status.TreeStatusVerifier( | 108 verifiers.append(tree_status.TreeStatusVerifier( |
| 108 'http://chromium-status.appspot.com/status')) | 109 'http://chromium-status.appspot.com/status')) |
| 110 |
| 111 post_processors = [chromium_copyright] |
| 109 return pending_manager.PendingManager( | 112 return pending_manager.PendingManager( |
| 110 rietveld_obj, | 113 rietveld_obj, |
| 111 local_checkout, | 114 local_checkout, |
| 112 verifiers_no_patch, | 115 verifiers_no_patch, |
| 113 verifiers) | 116 verifiers, |
| 117 post_processors) |
| 114 | 118 |
| 115 | 119 |
| 116 def _gen_nacl(user, root_dir, rietveld_obj, git_svn, no_try): | 120 def _gen_nacl(user, root_dir, rietveld_obj, git_svn, no_try): |
| 117 """Generates a PendingManager commit queue for Native Client.""" | 121 """Generates a PendingManager commit queue for Native Client.""" |
| 118 svn_creds = creds.Credentials(os.path.join(root_dir, '.svn_pwd')) | 122 svn_creds = creds.Credentials(os.path.join(root_dir, '.svn_pwd')) |
| 119 offset = 'trunk/src/native_client' | 123 offset = 'trunk/src/native_client' |
| 120 if git_svn: | 124 if git_svn: |
| 121 local_checkout = checkout.GitSvnCheckout( | 125 local_checkout = checkout.GitSvnCheckout( |
| 122 root_dir, | 126 root_dir, |
| 123 'nacl', | 127 'nacl', |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 builders, | 181 builders, |
| 178 [], | 182 [], |
| 179 ['--root', 'native_client'])) | 183 ['--root', 'native_client'])) |
| 180 | 184 |
| 181 verifiers.append(tree_status.TreeStatusVerifier( | 185 verifiers.append(tree_status.TreeStatusVerifier( |
| 182 'http://nativeclient-status.appspot.com/status')) | 186 'http://nativeclient-status.appspot.com/status')) |
| 183 return pending_manager.PendingManager( | 187 return pending_manager.PendingManager( |
| 184 rietveld_obj, | 188 rietveld_obj, |
| 185 local_checkout, | 189 local_checkout, |
| 186 verifiers_no_patch, | 190 verifiers_no_patch, |
| 187 verifiers) | 191 verifiers, |
| 192 []) |
| 188 | 193 |
| 189 | 194 |
| 190 def _gen_build(user, root_dir, rietveld_obj, git_svn, no_try): | 195 def _gen_build(user, root_dir, rietveld_obj, git_svn, no_try): |
| 191 """Generates a PendingManager commit queue for chrome/trunk/tools/build.""" | 196 """Generates a PendingManager commit queue for chrome/trunk/tools/build.""" |
| 192 return _internal_simple( | 197 return _internal_simple( |
| 193 'build', user, root_dir, rietveld_obj, git_svn, no_try) | 198 'build', user, root_dir, rietveld_obj, git_svn, no_try) |
| 194 | 199 |
| 195 | 200 |
| 196 def _gen_depot_tools(user, root_dir, rietveld_obj, git_svn, no_try): | 201 def _gen_depot_tools(user, root_dir, rietveld_obj, git_svn, no_try): |
| 197 """Generates a PendingManager commit queue for chrome/trunk/tools/depot_tools. | 202 """Generates a PendingManager commit queue for chrome/trunk/tools/depot_tools. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 verifiers_no_patch = [ | 247 verifiers_no_patch = [ |
| 243 project_base.ProjectBaseUrlVerifier(project_bases), | 248 project_base.ProjectBaseUrlVerifier(project_bases), |
| 244 reviewer_lgtm.ReviewerLgtmVerifier( | 249 reviewer_lgtm.ReviewerLgtmVerifier( |
| 245 _get_escaped_committers(root_dir), | 250 _get_escaped_committers(root_dir), |
| 246 [re.escape(user)]), | 251 [re.escape(user)]), |
| 247 ] | 252 ] |
| 248 verifiers = [ | 253 verifiers = [ |
| 249 presubmit_check.PresubmitCheckVerifier(), | 254 presubmit_check.PresubmitCheckVerifier(), |
| 250 ] | 255 ] |
| 251 | 256 |
| 257 post_processors = [chromium_copyright] |
| 252 return pending_manager.PendingManager( | 258 return pending_manager.PendingManager( |
| 253 rietveld_obj, | 259 rietveld_obj, |
| 254 local_checkout, | 260 local_checkout, |
| 255 verifiers_no_patch, | 261 verifiers_no_patch, |
| 256 verifiers) | 262 verifiers, |
| 263 post_processors) |
| 257 | 264 |
| 258 | 265 |
| 259 def supported_projects(): | 266 def supported_projects(): |
| 260 """List the projects that can be managed by the commit queue.""" | 267 """List the projects that can be managed by the commit queue.""" |
| 261 return sorted( | 268 return sorted( |
| 262 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) | 269 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) |
| 263 | 270 |
| 264 | 271 |
| 265 def load_project(project, user, root_dir, rietveld_obj, git_svn, no_try): | 272 def load_project(project, user, root_dir, rietveld_obj, git_svn, no_try): |
| 266 """Loads the specified project.""" | 273 """Loads the specified project.""" |
| 267 return getattr(sys.modules[__name__], '_gen_' + project)( | 274 return getattr(sys.modules[__name__], '_gen_' + project)( |
| 268 user, root_dir, rietveld_obj, git_svn, no_try) | 275 user, root_dir, rietveld_obj, git_svn, no_try) |
| OLD | NEW |