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, |
| 480 commit_user=user) |
479 context_obj = context.Context( | 481 context_obj = context.Context( |
480 rietveld_obj, | 482 rietveld_obj, |
481 local_checkout, | 483 local_checkout, |
482 async_push.AsyncPush( | 484 async_push.AsyncPush( |
483 'https://skia-tree-status.appspot.com/cq', | 485 'https://skia-tree-status.appspot.com/cq', |
484 _skia_status_pwd(root_dir)), | 486 _skia_status_pwd(root_dir)), |
485 server_hooks_missing=True) | 487 server_hooks_missing=True) |
486 | 488 |
487 project_bases = [ | 489 project_bases = [ |
488 '^%s(|/.*)$' % re.escape(base + naked_url) for base in ('http', 'https') | 490 '^%s(?:\.git)?%s$' % (re.escape(skia_git_url), BRANCH_MATCH) |
489 ] | 491 ] |
490 verifiers_no_patch = [ | 492 verifiers_no_patch = [ |
491 project_base.ProjectBaseUrlVerifier(project_bases), | 493 project_base.ProjectBaseUrlVerifier(project_bases), |
492 reviewer_lgtm.ReviewerLgtmVerifier( | 494 reviewer_lgtm.ReviewerLgtmVerifier( |
493 _get_skia_committers(), | 495 _get_skia_committers(), |
494 [re.escape(user)]), | 496 [re.escape(user)]), |
495 ] | 497 ] |
496 verifiers = [ | 498 verifiers = [ |
497 presubmit_check.PresubmitCheckVerifier(context_obj), | 499 presubmit_check.PresubmitCheckVerifier(context_obj), |
498 tree_status.TreeStatusVerifier( | 500 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.""" | 737 """List the projects that can be managed by the commit queue.""" |
736 return sorted( | 738 return sorted( |
737 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) | 739 x[5:] for x in dir(sys.modules[__name__]) if x.startswith('_gen_')) |
738 | 740 |
739 | 741 |
740 def load_project(project, user, root_dir, rietveld_obj, no_try): | 742 def load_project(project, user, root_dir, rietveld_obj, no_try): |
741 """Loads the specified project.""" | 743 """Loads the specified project.""" |
742 assert os.path.isabs(root_dir) | 744 assert os.path.isabs(root_dir) |
743 return getattr(sys.modules[__name__], '_gen_' + project)( | 745 return getattr(sys.modules[__name__], '_gen_' + project)( |
744 user, root_dir, rietveld_obj, no_try) | 746 user, root_dir, rietveld_obj, no_try) |
OLD | NEW |