Bug 1270317 - Define a clone_upstream_url property; r=jlund draft
authorGregory Szorc <gps@mozilla.com>
Fri, 06 May 2016 10:51:06 -0700
changeset 368016 2ebd1a2a43bf6c1e675d99ebca3861fb63aac2d4
parent 368015 fbff6c094e12a8fa3cefba346e7adbcb21fde64d
child 368017 0b915260c86b0dbda02b6ac564d82939950bfb63
push id18412
push userbmo:gps@mozilla.com
push dateTue, 17 May 2016 23:09:21 +0000
reviewersjlund
bugs1270317
milestone49.0a1
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
testing/mozharness/configs/builds/branch_specifics.py
testing/mozharness/configs/single_locale/try.py
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- 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)