зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1512188 - Collect hg store path in collect_vcs_options(); r=tomprince,dustin
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
This commit is contained in:
Родитель
952e5d5655
Коммит
2bf175f722
|
@ -523,8 +523,13 @@ def collect_vcs_options(args, project):
|
||||||
revision = os.environ.get('%s_HEAD_REV' % env_prefix)
|
revision = os.environ.get('%s_HEAD_REV' % env_prefix)
|
||||||
branch = os.environ.get('%s_HEAD_REF' % env_prefix)
|
branch = os.environ.get('%s_HEAD_REF' % env_prefix)
|
||||||
|
|
||||||
|
store_path = os.environ.get('HG_STORE_PATH')
|
||||||
|
|
||||||
|
# Expand ~ in some paths.
|
||||||
if checkout:
|
if checkout:
|
||||||
checkout = os.path.expanduser(checkout)
|
checkout = os.path.expanduser(checkout)
|
||||||
|
if store_path:
|
||||||
|
store_path = os.path.expanduser(store_path)
|
||||||
|
|
||||||
# Some callers set the base repository to mozilla-central for historical
|
# Some callers set the base repository to mozilla-central for historical
|
||||||
# reasons. Switch to mozilla-unified because robustcheckout works best
|
# reasons. Switch to mozilla-unified because robustcheckout works best
|
||||||
|
@ -533,6 +538,7 @@ def collect_vcs_options(args, project):
|
||||||
base_repo = 'https://hg.mozilla.org/mozilla-unified'
|
base_repo = 'https://hg.mozilla.org/mozilla-unified'
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
'store-path': store_path,
|
||||||
'project': project,
|
'project': project,
|
||||||
'checkout': checkout,
|
'checkout': checkout,
|
||||||
'sparse-profile': sparse_profile,
|
'sparse-profile': sparse_profile,
|
||||||
|
@ -570,10 +576,6 @@ def main(args):
|
||||||
|
|
||||||
args = parser.parse_args(our_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
|
uid = gid = gids = None
|
||||||
if IS_POSIX and running_as_root:
|
if IS_POSIX and running_as_root:
|
||||||
user, group, gids = get_posix_user_group(args.user, args.group)
|
user, group, gids = get_posix_user_group(args.user, args.group)
|
||||||
|
@ -730,7 +732,7 @@ def main(args):
|
||||||
os.environ['GECKO_HEAD_REV'] = vcs_checkout(
|
os.environ['GECKO_HEAD_REV'] = vcs_checkout(
|
||||||
gecko_options['head-repo'],
|
gecko_options['head-repo'],
|
||||||
gecko_options['checkout'],
|
gecko_options['checkout'],
|
||||||
os.environ['HG_STORE_PATH'],
|
gecko_options['store-path'],
|
||||||
fetch_hgfingerprint=args.fetch_hgfingerprint,
|
fetch_hgfingerprint=args.fetch_hgfingerprint,
|
||||||
base_repo=gecko_options['base-repo'],
|
base_repo=gecko_options['base-repo'],
|
||||||
revision=gecko_options['revision'],
|
revision=gecko_options['revision'],
|
||||||
|
@ -749,7 +751,7 @@ def main(args):
|
||||||
os.environ['COMM_HEAD_REV'] = vcs_checkout(
|
os.environ['COMM_HEAD_REV'] = vcs_checkout(
|
||||||
comm_options['head-repo'],
|
comm_options['head-repo'],
|
||||||
comm_options['checkout'],
|
comm_options['checkout'],
|
||||||
os.environ['HG_STORE_PATH'],
|
comm_options['store-path'],
|
||||||
fetch_hgfingerprint=args.fetch_hgfingerprint,
|
fetch_hgfingerprint=args.fetch_hgfingerprint,
|
||||||
base_repo=comm_options['base-repo'],
|
base_repo=comm_options['base-repo'],
|
||||||
revision=comm_options['revision'],
|
revision=comm_options['revision'],
|
||||||
|
|
Загрузка…
Ссылка в новой задаче