Skip to content

Add conan ext:check-prevs command#242

Draft
AbrilRBS wants to merge 3 commits into
conan-io:mainfrom
AbrilRBS:ar/check-prevs-command
Draft

Add conan ext:check-prevs command#242
AbrilRBS wants to merge 3 commits into
conan-io:mainfrom
AbrilRBS:ar/check-prevs-command

Conversation

@AbrilRBS

@AbrilRBS AbrilRBS commented Mar 6, 2026

Copy link
Copy Markdown
Member

# No need to ask the server (again if coming from the select endpoint)
# we already know there are multiple revisions for this package_id
for prev in prevs:
revisions.append(PkgReference(ref, package_id, prev))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

An optimization when the pkglist already contains more than 1 prev. The only downside is that the resulting pkglist won't contain possible extra prevs that might have been present in the remote

import textwrap

import pytest
from conan.test.utils.tools import TestClient

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Uploaded as-is to test if we can use normal Conan test suite classes here

listfile = make_abs_path(args.list)
multi_package_list = MultiPackagesList.load(listfile)
if remote.name not in multi_package_list.lists:
ConanOutput().warning(f"No packages for remote '{remote.name}' were found "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not clear, maybe we want to check that no different package revisions exists in different remotes?

Maybe the input should be "remote-less", that is a PackageList, not a MultiPackageList with origin or something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants