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

take into account branch, tag or rev on git dependencies #655

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 10 additions & 1 deletion conda_lock/src_parser/pyproject_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,16 @@ def parse_poetry_pyproject_toml(
version = poetry_version_spec

if "git" in depattrs and url is not None:
url, rev = unpack_git_url(url)
url, at_rev = unpack_git_url(url)
rev = (
depattrs.get("branch") or depattrs.get("tag") or depattrs.get("rev")
)
if rev is None:
rev = at_rev
elif at_rev is not None and at_rev != rev:
raise ValueError(
f"git dependency {depname} has conflicting rev ({rev}) and url@rev {at_rev} specified"
)
dependencies.append(
VCSDependency(
name=name,
Expand Down
Loading