Skip to content

Commit

Permalink
Bug 1512188 - Collect hg store path in collect_vcs_options(); r=tompr…
Browse files Browse the repository at this point in the history
…ince

One step closer to making all state gathering and normalization in one
place.

Differential Revision: https://phabricator.services.mozilla.com/D13819

--HG--
extra : moz-landing-system : lando
  • Loading branch information
indygreg committed Dec 11, 2018
1 parent b655718 commit d969ada
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions taskcluster/scripts/run-task
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,11 @@ def collect_vcs_options(args, project, env_prefix=None):
revision = os.environ.get('%s_HEAD_REV' % env_prefix)
branch = os.environ.get('%s_HEAD_REF' % env_prefix)

store_path = os.environ['HG_STORE_PATH']

# Expand ~ in some paths.
checkout = os.path.expanduser(checkout)
store_path = os.path.expanduser(store_path)

# Some callers set the base repository to mozilla-central for historical
# reasons. Switch to mozilla-unified because robustcheckout works best
Expand All @@ -531,6 +535,7 @@ def collect_vcs_options(args, project, env_prefix=None):
base_repo = 'https://hg.mozilla.org/mozilla-unified'

return {
'store-path': store_path,
'project': project,
'checkout': checkout,
'sparse-profile': sparse_profile,
Expand Down Expand Up @@ -568,10 +573,6 @@ def main(args):

args = parser.parse_args(our_args)

# expand ~ in some paths
if 'HG_STORE_PATH' in os.environ:
os.environ['HG_STORE_PATH'] = os.path.expanduser(os.environ['HG_STORE_PATH'])

uid = gid = gids = None
if IS_POSIX and running_as_root:
user, group, gids = get_posix_user_group(args.user, args.group)
Expand Down Expand Up @@ -728,7 +729,7 @@ def main(args):
os.environ['GECKO_HEAD_REV'] = vcs_checkout(
firefox_checkout['head-repo'],
firefox_checkout['checkout'],
os.environ['HG_STORE_PATH'],
firefox_checkout['store-path'],
fetch_hgfingerprint=args.fetch_hgfingerprint,
base_repo=firefox_checkout['base-repo'],
revision=firefox_checkout['revision'],
Expand All @@ -749,7 +750,7 @@ def main(args):
os.environ['COMM_HEAD_REV'] = vcs_checkout(
comm_checkout['head-repo'],
comm_checkout['checkout'],
os.environ['HG_STORE_PATH'],
comm_checkout['store-path'],
fetch_hgfingerprint=args.fetch_hgfingerprint,
base_repo=comm_checkout['base-repo'],
revision=comm_checkout['revision'],
Expand Down

0 comments on commit d969ada

Please sign in to comment.