| OLD | NEW |
| 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 """Define the supported projects.""" | 4 """Define the supported projects.""" |
| 5 | 5 |
| 6 import json | 6 import json |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 import sys | 10 import sys |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 def _gen_skia(user, root_dir, rietveld_obj, no_try): | 462 def _gen_skia(user, root_dir, rietveld_obj, no_try): |
| 463 """Generates a PendingManager commit queue for Skia. | 463 """Generates a PendingManager commit queue for Skia. |
| 464 | 464 |
| 465 Adds the following verifiers to the PendingManager: | 465 Adds the following verifiers to the PendingManager: |
| 466 * ProjectBaseUrlVerifier | 466 * ProjectBaseUrlVerifier |
| 467 * ReviewerLgtmVerifier | 467 * ReviewerLgtmVerifier |
| 468 * PresubmitCheckVerifier | 468 * PresubmitCheckVerifier |
| 469 * TreeStatusVerifier | 469 * TreeStatusVerifier |
| 470 * TryRunnerRietveld (runs compile trybots) | 470 * TryRunnerRietveld (runs compile trybots) |
| 471 """ | 471 """ |
| 472 naked_url = '://skia.googlecode.com/svn/trunk' | 472 # TODO(rmistry): Update this to use the real Skia Git repository. Right now it |
| 473 local_checkout = checkout.SvnCheckout( | 473 # is pointed to the skiabot-test repository. |
| 474 root_dir, | 474 skia_git_url = 'https://skia.googlesource.com/skiabot-test' |
| 475 'skia', | 475 local_checkout = checkout.GitCheckout( |
| 476 user, | 476 root_dir=root_dir, |
| 477 None, | 477 project_name='skia', |
| 478 'https' + naked_url) | 478 remote_branch='master', |
| 479 git_url=skia_git_url) |
| 479 context_obj = context.Context( | 480 context_obj = context.Context( |
| 480 rietveld_obj, | 481 rietveld_obj, |
| 481 local_checkout, | 482 local_checkout, |
| 482 async_push.AsyncPush( | 483 async_push.AsyncPush( |
| 483 'https://skia-tree-status.appspot.com/cq', | 484 'https://skia-tree-status.appspot.com/cq', |
| 484 _skia_status_pwd(root_dir)), | 485 _skia_status_pwd(root_dir)), |
| 485 server_hooks_missing=True) | 486 server_hooks_missing=True) |
| 486 | 487 |
| 487 project_bases = [ | 488 project_bases = [ |
| 488 '^%s(|/.*)$' % re.escape(base + naked_url) for base in ('http', 'https') | 489 '^%s(?:\.git)?%s$' % (re.escape(skia_git_url), BRANCH_MATCH) |
| 489 ] | 490 ] |
| 490 verifiers_no_patch = [ | 491 verifiers_no_patch = [ |
| 491 project_base.ProjectBaseUrlVerifier(project_bases), | 492 project_base.ProjectBaseUrlVerifier(project_bases), |
| 492 reviewer_lgtm.ReviewerLgtmVerifier( | 493 reviewer_lgtm.ReviewerLgtmVerifier( |
| 493 _get_skia_committers(), | 494 _get_skia_committers(), |
| 494 [re.escape(user)]), | 495 [re.escape(user)]), |
| 495 ] | 496 ] |
| 496 verifiers = [ | 497 verifiers = [ |
| 497 presubmit_check.PresubmitCheckVerifier(context_obj), | 498 presubmit_check.PresubmitCheckVerifier(context_obj), |
| 498 tree_status.TreeStatusVerifier( | 499 tree_status.TreeStatusVerifier( |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 """List the projects that can be managed by the commit queue.""" | 736 """List the projects that can be managed by the commit queue.""" |
| 736 return sorted( | 737 return sorted( |
| 737 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) | 738 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) |
| 738 | 739 |
| 739 | 740 |
| 740 def load_project(project, user, root_dir, rietveld_obj, no_try): | 741 def load_project(project, user, root_dir, rietveld_obj, no_try): |
| 741 """Loads the specified project.""" | 742 """Loads the specified project.""" |
| 742 assert os.path.isabs(root_dir) | 743 assert os.path.isabs(root_dir) |
| 743 return getattr(sys.modules[__name__], '_gen_' + project)( | 744 return getattr(sys.modules[__name__], '_gen_' + project)( |
| 744 user, root_dir, rietveld_obj, no_try) | 745 user, root_dir, rietveld_obj, no_try) |
| OLD | NEW |