Skip to content
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

Update git tests to not use local partial clones #12721

Merged
merged 1 commit into from
May 22, 2024
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
8 changes: 7 additions & 1 deletion tests/lib/local_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def local_checkout(
created as a sub directory of the base temp directory.
"""
assert "+" in remote_repo
vcs_name = remote_repo.split("+", 1)[0]
vcs_name, vcs_url = remote_repo.split("+", 1)
repository_name = os.path.basename(remote_repo)

directory = temp_path.joinpath("cache")
Expand All @@ -51,6 +51,12 @@ def local_checkout(
assert repository_name == "INITools"
_create_svn_initools_repo(repo_url_path)
repo_url_path = os.path.join(repo_url_path, "trunk")
elif vcs_name == "git":
# Don't use vcs_backend.obtain() here because we don't want a partial clone:
# https://github.com/pypa/pip/issues/12719
subprocess.check_call(
["git", "clone", vcs_url, repo_url_path],
)
else:
vcs_backend = vcs.get_backend(vcs_name)
assert vcs_backend is not None
Expand Down
Loading