Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Nov 2022 12:22:02 +0100] rev 49802
scheme: move the drive letter checking in its own function
This help the readability of the main function as is was taking much more room
than the main logic.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Nov 2022 21:48:08 +0100] rev 49801
peer-or-repo: split the scheme between repo and peer
Some of the scheme will always produce a peer and some will always produce a
repository. So lets use different mapping to reduce the ambiguity.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Nov 2022 13:55:15 +0100] rev 49800
peer-or-repo: stop relying on AttributeError in `islocal`
This will confused pytypes in a future changeset.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Nov 2022 21:42:08 +0100] rev 49799
repo-or-peer: deprecate calling `islocal` on non-path object
There object have a `.local()` method and should use it.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 30 Nov 2022 11:12:48 +0100] rev 49798
share: stop using 'islocal' with repo instance
Having this level of polymorphism of the `islocal` function is weird, and we
already have a way to know if the repo is local from the object itself.
We are about to deprecate passing a non-bytes object to `islocal`, so clean this
up beforehand.
We might want to clean up this function too in the future, however this is
another adventure.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Nov 2022 19:54:55 +0100] rev 49797
peer-or-repo: make sure object in "scheme" have a `instance` object
The previous form of having heterogeneous object in the dictionnary makes things
more complicated than they needed to be. I am not super happy about the current
(especially around 'islocal', that most item do not have), but this is already
much better.
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Nov 2022 18:30:54 +0100] rev 49796
peer-or-repo: move the object setup in its own function
The `_peerorrepo` function is problematic, because it can build different types
of object (repository and peer). This make it hard to adjust the arguments to
the type of object we needs. So this patch start a series of change to create
peer and repo without going through a common function.
We move the part of the function doing object setup it its own function to make
it simpler to reuse in others contexts.