| Index: scripts/master/buildbucket/__init__.py
|
| diff --git a/scripts/master/buildbucket/__init__.py b/scripts/master/buildbucket/__init__.py
|
| index 2387e83dc7e57edbca9af98716654b872f8c0299..16875a1483fef1822bf0353e5f372a8c74c28774 100644
|
| --- a/scripts/master/buildbucket/__init__.py
|
| +++ b/scripts/master/buildbucket/__init__.py
|
| @@ -25,6 +25,7 @@ from .common import Error
|
| from .integration import BuildBucketIntegrator, MAX_MAX_BUILDS
|
| from .poller import BuildBucketPoller
|
| from .status import BuildBucketStatus
|
| +from . import changestore
|
| from . import client
|
| from . import trigger
|
|
|
| @@ -35,7 +36,7 @@ NO_LEASE_LIMIT = sys.maxint
|
| def setup(
|
| config, active_master, buckets, build_params_hook=None,
|
| poll_interval=10, buildbucket_hostname=None, max_lease_count=None,
|
| - verbose=None, dry_run=None):
|
| + verbose=None, dry_run=None, unique_change_urls=False):
|
| """Configures a master to lease, schedule and update builds on buildbucket.
|
|
|
| Requires config to have 'mergeRequests' set to False.
|
| @@ -60,6 +61,9 @@ def setup(
|
| time. Defaults to the number of connected slaves.
|
| verbose (bool): log more than usual. Defaults to False.
|
| dry_run (bool): whether to run buildbucket in a dry-run mode.
|
| + unique_change_urls (bool): if True, change URLs in builds are treated as
|
| + change identifiers. This is True on waterfalls and typically False on
|
| + tryservers.
|
|
|
| Raises:
|
| buildbucket.Error if config['mergeRequests'] is not False.
|
| @@ -77,7 +81,9 @@ def setup(
|
|
|
| integrator = BuildBucketIntegrator(
|
| buckets, build_params_hook=build_params_hook,
|
| - max_lease_count=max_lease_count)
|
| + max_lease_count=max_lease_count,
|
| + change_store_factory=lambda bb: changestore.ChangeStore(
|
| + bb, unique_urls=unique_change_urls))
|
|
|
| buildbucket_service = client.create_buildbucket_service(
|
| active_master, buildbucket_hostname, verbose)
|
|
|