Chromium Code Reviews| Index: scripts/master/master_gen.py |
| diff --git a/scripts/master/master_gen.py b/scripts/master/master_gen.py |
| index 03327080d5d47699c7a2fba48196b11e81daf984..74f4f9d9bbdd1b566ebeefdcd713f8fbb538e868 100644 |
| --- a/scripts/master/master_gen.py |
| +++ b/scripts/master/master_gen.py |
| @@ -16,6 +16,7 @@ from common import chromium_utils |
| from master import gitiles_poller |
| from master import master_utils |
| +from master import repo_poller |
| from master import slaves_list |
| from master.factory import annotator_factory |
| @@ -137,7 +138,7 @@ def _ComputeSchedulers(builders): |
| scheduler_type = scheduler_values['type'] |
| builder_names = scheduler_to_builders[scheduler_name] |
| - if scheduler_type == 'git_poller': |
| + if scheduler_type in ('git_poller', 'repo_poller'): |
| schedulers.append(SingleBranchScheduler( |
| name=scheduler_name, |
| branch='master', |
| @@ -167,6 +168,19 @@ def _ComputeChangeSourceAndTagComparator(builders): |
| if v['type'] == 'git_poller')): |
| change_source.append(gitiles_poller.GitilesPoller(url)) |
| + for scheduler_config in builders['schedulers'].values(): |
| + if scheduler_config['type'] != 'repo_poller': |
| + continue |
| + |
| + rev_link_template = scheduler_config.get('rev_link_template', None) |
|
ghost stip (do not use)
2015/10/12 23:53:11
.get() already returns None, so you can just do re
danalbert
2015/10/13 00:29:52
Yeah, I just felt writing it was better to be expl
|
| + branch = scheduler_config.get('branch', None) |
|
ghost stip (do not use)
2015/10/12 23:53:11
same here, you can just do scheduler_config.get('b
|
| + change_source.append(repo_poller.RepoPoller( |
| + repo_url=scheduler_config['repo_url'], |
| + manifest='manifest', |
| + repo_branches=[branch], |
|
ghost stip (do not use)
2015/10/12 23:53:11
what happens if repo_branches = [None] ? should we
danalbert
2015/10/13 00:29:51
It should actually be either `None` or `[]` rather
|
| + pollInterval=300, |
| + revlinktmpl=rev_link_template)) |
| + |
| # We have to set the tag_comparator to something, but if we have multiple |
| # repos, the tag_comparator will not work properly (it's meaningless). |
| # It's not clear if there's a good answer to this. |