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

Disabling/enabling remotes: Issue/5544 #5623

Merged
merged 57 commits into from Sep 10, 2019

Conversation

@czoido
Copy link
Contributor

commented Aug 14, 2019

Changelog: Feature: Add subcommand for enabling and disabling remotes
Docs: conan-io/docs#1392

This PR provides the option to enable or disable remotes with the subcommand. By default all remotes are created with disabled=False and the remotes.json file only adds the information in case disabled=True so the absence of the parameter does not break loading files from previous versions

The use is:

conan remote enable/disable -r remote_name_or_pattern

This way you can have remotes in your remotes.json and skip them for operations such as
search or install without having to remove them. The command works with patterns as well so if you have lots of remotes and you only want to have a couple enabled you can do:

conan remote disable *
conan remote enable remote1
conan remote enable remote2

The default behaviour is that disabled remotes will be omitted for every operation but not for printing the list of remotes with conan remote list also if you try to make an operation with a remote that is in disabled state an error will be raised.

Closes #5544

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@CLAassistant

This comment has been minimized.

Copy link

commented Aug 14, 2019

CLA assistant check
All committers have signed the CLA.

@czoido czoido force-pushed the czoido:issue/5544 branch from 960e998 to a8a61bb Aug 14, 2019
@czoido czoido requested a review from lasote Aug 20, 2019
conans/client/cmd/search.py Outdated Show resolved Hide resolved
@czoido czoido requested review from lasote and jgsogo Aug 20, 2019
Copy link
Member

left a comment

Almost there, just a couple of details

conans/client/cache/remote_registry.py Show resolved Hide resolved
conans/test/functional/command/remote_test.py Outdated Show resolved Hide resolved
conans/test/functional/command/search_test.py Outdated Show resolved Hide resolved
czoido added 2 commits Aug 24, 2019
Copy link
Member

left a comment

LGTM, good job!

@jgsogo
jgsogo approved these changes Aug 27, 2019
@lasote
lasote approved these changes Sep 10, 2019
@lasote lasote merged commit 5d785b3 into conan-io:develop Sep 10, 2019
2 checks passed
2 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details
@lasote lasote removed their assignment Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.