Skip to content

[update-checkout] Skip cloning repos not specified in scheme. #17949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions utils/update_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,21 @@ def obtain_all_additional_swift_sources(args, config, with_ssh, scheme_name,
remote = config['https-clone-pattern'] % remote_repo_id

repo_branch = None
repo_not_in_scheme = False
if scheme_name:
for v in config['branch-schemes'].values():
if scheme_name not in v['aliases']:
continue
# If repo is not specified in the scheme, skip cloning it.
if repo_name not in v['repos']:
repo_not_in_scheme = True
continue
repo_branch = v['repos'][repo_name]
break
else:
repo_branch = scheme_name
if repo_not_in_scheme:
continue

pool_args.append([args, repo_name, repo_info, repo_branch, remote,
with_ssh, scheme_name, skip_history,
Expand Down