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

do not change the order of the remotes #614

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Basti-D
Copy link

@Basti-D Basti-D commented Dec 6, 2022

Changelog: (Bugfix):

Fixes #613

Do not change the order of the remotes by using the default value from the Conan API instead of -1 in add_remotes_to_conan -> _add_remote

Probably in Remotesmanager._add_remote the default argument of insert should be changed to None instead of False. The ConanAPI uses None as a the default value.
The default value False gets treated differently then None . False gets interpreted as not None , hence we go in the insert_by_index case. index = int(False) = 0`` Hence it will put always to the beginning. The current version uses index=-1`` which does not push to the end. It pushes to end -1, i.e. 1 BEFORE the last element.
`None` has it's own handling and adds the remote to the end of the remotes OrderedDict which should be the correct behavior [see remote_registry.py : Remotes._remotes].

@CLAassistant
Copy link

CLAassistant commented Dec 6, 2022

CLA assistant check
All committers have signed the CLA.

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.

RemotesManager should not change the order of the remotes
2 participants