From 7d0932f16afe8c7a90e1cd6f858c1856d6a8c7ac Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Sat, 29 Dec 2018 05:13:36 +0000 Subject: [PATCH] Bug 1512188 - Move base repo normalization into collect_vcs_options(); r=tomprince,dustin This is a generic normalization and doesn't need to be Firefox specific. Differential Revision: https://phabricator.services.mozilla.com/D13817 --HG-- extra : moz-landing-system : lando --- taskcluster/scripts/run-task | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/taskcluster/scripts/run-task b/taskcluster/scripts/run-task index 749bcbb6361b3..98d68ef5df2ba 100755 --- a/taskcluster/scripts/run-task +++ b/taskcluster/scripts/run-task @@ -526,6 +526,12 @@ def collect_vcs_options(args, project): if checkout: checkout = os.path.expanduser(checkout) + # Some callers set the base repository to mozilla-central for historical + # reasons. Switch to mozilla-unified because robustcheckout works best + # with it. + if base_repo == 'https://hg.mozilla.org/mozilla-central': + base_repo = 'https://hg.mozilla.org/mozilla-unified' + return { 'project': project, 'checkout': checkout, @@ -721,19 +727,12 @@ def main(args): gecko_options = collect_vcs_options(args, 'gecko') if gecko_options['checkout']: - base_repo = gecko_checkout['base-repo'] - # Some callers set the base repository to mozilla-central for historical - # reasons. Switch to mozilla-unified because robustcheckout works best - # with it. - if base_repo == 'https://hg.mozilla.org/mozilla-central': - base_repo = 'https://hg.mozilla.org/mozilla-unified' - os.environ['GECKO_HEAD_REV'] = vcs_checkout( gecko_options['head-repo'], gecko_options['checkout'], os.environ['HG_STORE_PATH'], fetch_hgfingerprint=args.fetch_hgfingerprint, - base_repo=base_repo, + base_repo=gecko_options['base-repo'], revision=gecko_options['revision'], branch=gecko_options['branch'], sparse_profile=gecko_options['sparse-profile'])