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

conan search <pattern> --revisions with cache Issue/5472 #5537

Merged
merged 35 commits into from Jul 29, 2019
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
16d2c6d
Added required = True to subparsers in order to print error message i…
czoido Apr 4, 2019
ca0d13f
Merge remote-tracking branch 'upstream/develop' into develop
czoido Apr 10, 2019
6ab6126
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Apr 10, 2019
028e495
sync
czoido Apr 10, 2019
4b014e0
basic concurrent upload at reference level with futures
czoido Apr 10, 2019
de66b1d
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Apr 15, 2019
bfa9366
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Apr 21, 2019
f9e3ee0
revert changes
czoido Apr 21, 2019
4a8f6ce
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Apr 23, 2019
052b6ff
add line
czoido Apr 23, 2019
2f999d2
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jun 4, 2019
618c4a5
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jun 10, 2019
3cd895b
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jun 24, 2019
2b2f7c2
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jun 25, 2019
20fee8b
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jun 26, 2019
b0adf57
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jul 1, 2019
9989584
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jul 2, 2019
4a21d2d
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jul 3, 2019
9c30bf2
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jul 8, 2019
d6f2e65
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jul 17, 2019
38868d9
Merge branch 'develop' of https://github.com/conan-io/conan into develop
czoido Jul 25, 2019
4c17b73
include revision in string if present
czoido Jul 25, 2019
30388e7
pass revisions argument
czoido Jul 25, 2019
42903f8
minor changes
czoido Jul 25, 2019
dd1f897
error when --revisions and --remote with pattern
czoido Jul 26, 2019
4723ed5
behaviour has changed, had to modify test
czoido Jul 26, 2019
96d3096
revert most of changes
czoido Jul 26, 2019
870b69b
move implementation to command.py
czoido Jul 26, 2019
d20a843
raise exception when no valid filter
czoido Jul 26, 2019
e4ab962
change order
czoido Jul 26, 2019
28bc2f8
add some tests
czoido Jul 26, 2019
cf549b5
restore method
lasote Jul 29, 2019
1130d28
Merge remote-tracking branch 'origin/develop' into issue/5472
lasote Jul 29, 2019
77f070b
Refactor
lasote Jul 29, 2019
25009a6
Try refactor
lasote Jul 29, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

raise exception when no valid filter

  • Loading branch information...
czoido committed Jul 26, 2019
commit d20a843f1084177e297f68c1d289794d25febf0d
@@ -1219,24 +1219,27 @@ def search(self, *args):
self._outputer.print_revisions(ref, info, remote_name=args.remote)
return
else:
exc_msg = "With --revision, specify a reference (e.g {ref}) a valid pattern " \
"or a package reference with " \
"recipe revision (e.g {ref}#3453453453:d50a0d523d98c15bb147b18f" \
"a7d203887c38be8b)".format(ref=_REFERENCE_EXAMPLE)
if args.remote:
msg = "With --revision and --remote, specify a reference (e.g {ref}) or a package " \
"reference with " \
"recipe revision (e.g {ref}#3453453453:d50a0d523d98c15bb147b18f" \
"a7d203887c38be8b)".format(ref=_REFERENCE_EXAMPLE)
raise ConanException(msg)
raise ConanException(exc_msg)
else:
info = self._conan.search_recipes(args.pattern_or_reference,
remote_name=args.remote,
case_sensitive=args.case_sensitive)
for remote_info in info["results"]:
for conan_item in remote_info["items"]:
reference = conan_item["recipe"]["id"]
ref = ConanFileReference.loads(reference)
rev = self._conan.get_recipe_revisions(repr(ref),
remote_name=args.remote,
check_rev_time=False)
self._outputer.print_revisions(ref, rev, remote_name=args.remote)
if info["results"]:

This comment has been minimized.

Copy link
@lasote

lasote Jul 29, 2019

Contributor

This feels hacky too

for remote_info in info["results"]:
for conan_item in remote_info["items"]:
reference = conan_item["recipe"]["id"]
ref = ConanFileReference.loads(reference)
rev = self._conan.get_recipe_revisions(repr(ref),
remote_name=args.remote,
check_rev_time=False)
self._outputer.print_revisions(ref, rev, remote_name=args.remote)
else:
raise ConanException(exc_msg)

return
if ref:
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.