Bug 1270317 - Define a clone_upstream_url property; r=jlund
We currently have a "clone_by_revision" property that indicates to
perform a `hg clone -r`. We use it for cloning from Try.
Cloning single revisions undermines the benefits of clone bundles. So,
I'll be replacing "clone_by_revision" with a feature that clones from
another "upstream" repo then does a `hg pull -r` on the wanted revision.
This commit starts that work by introducing a "clone_upstream_url"
property. We define it on Try. It is currently unused.
MozReview-Commit-ID: Dohs8bCTUkB
--- a/testing/mozharness/configs/builds/branch_specifics.py
+++ b/testing/mozharness/configs/builds/branch_specifics.py
@@ -264,16 +264,19 @@ config = {
'update_channel': 'aurora',
'branch_uses_per_checkin_strategy': True,
'stage_server': 'upload.ffxbld.productdelivery.prod.mozaws.net',
},
'try': {
'repo_path': 'try',
'clone_by_revision': True,
'clone_with_purge': True,
+ # FUTURE this should be a unified repo because Try pushes may e.g.
+ # be on Aurora or Beta revisions.
+ 'clone_upstream_url': 'https://hg.mozilla.org/mozilla-central',
'tinderbox_build_dir': '%(who)s-%(got_revision)s',
'to_tinderbox_dated': False,
'include_post_upload_builddir': True,
'release_to_try_builds': True,
'stage_server': 'upload.trybld.productdelivery.prod.mozaws.net',
'stage_username': 'trybld',
'stage_ssh_key': 'trybld_dsa',
'branch_supports_uploadsymbols': False,
--- a/testing/mozharness/configs/single_locale/try.py
+++ b/testing/mozharness/configs/single_locale/try.py
@@ -20,16 +20,17 @@ config = {
"repo": "https://hg.mozilla.org/build/tools",
"revision": "default",
"dest": "tools",
}, {
"vcs": "hgtool",
"repo": "https://hg.mozilla.org/try",
"revision": "%(revision)s",
"dest": "try",
+ "clone_upstream_url": "https://hg.mozilla.org/mozilla-central",
"clone_by_revision": True,
"clone_with_purge": True,
}, {
"vcs": "hgtool",
"repo": "https://hg.mozilla.org/build/compare-locales",
"revision": "RELEASE_AUTOMATION"
}],
# purge options
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -1161,16 +1161,17 @@ or run without that action (ie: --no-{ac
'revision': self.query_revision(),
'env': self.query_build_env()
}
if c.get('clone_by_revision'):
vcs_checkout_kwargs['clone_by_revision'] = True
if c.get('clone_with_purge'):
vcs_checkout_kwargs['clone_with_purge'] = True
+ vcs_checkout_kwargs['clone_upstream_url'] = c.get('clone_upstream_url')
rev = self.vcs_checkout(**vcs_checkout_kwargs)
if c.get('is_automation'):
changes = self.buildbot_config['sourcestamp']['changes']
if changes:
comments = changes[0].get('comments', '')
self.set_buildbot_property('comments',
comments,
write_to_file=True)