Skip to content

Conversation

@mdellweg
Copy link
Member

@mdellweg mdellweg commented Jan 2, 2026

fixes #1290

@mdellweg mdellweg enabled auto-merge (rebase) January 2, 2026 18:56
if base_repository is None:
base_repository = repo_ctx
base_version_ctx = base_repository.get_version_context(base_version)
repo_ctx.modify(add_content=[content_ctx.pulp_href], base_version=base_version_ctx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous code would use base_repository.get_version_context(-1) if no base-version was passed in - so we'd create a new version in repo_ctx, based on base_repository.latest. This change ignores base_repository unless base_version_ctx is also passed in.

If base_version is None and base_repository is not None then base_version_ctx needs to be base_repository.get_version_context(-1), yeah?

base_repository = repo_ctx
base_version_ctx = base_repository.get_version_context(base_version)
elif base_repository is not None:
base_version_ctx = base_repository.get_version_context(-1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mdellweg mdellweg merged commit 88a0449 into pulp:main Jan 6, 2026
18 checks passed
@mdellweg mdellweg deleted the modify branch January 6, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pulp-cli passing an extra argument when modifying a repo

2 participants