datalad_next.patches.replace_ora_remote
Patch datalad.distributed.ora_remote.ORARemote
This patch replaces the class datalad.distributed.ora_remote.ORARemote
with an updated version that should work properly on Linux, OSX, and Windows.
The main difference to the original code is that all path-operations are
performed on URL-paths. Those are represented by instances of PurePosixPath.
All subclasses of BaseIO
, i.e. LocalIO
, SSHRemoteIO
,
and HTTPRemoteIO
, are extended to contain the method
url2transport_path()
. This method converts an URL-path into the correct
path for the transport, i.e. the IO abstraction.
Before methods on a subclass of BaseIO
that require a path are called,
the generic URL-path is converted into the correct path for the IO-class by
calling url2transport_path()
on the respective IO-class.
The patch keeps changes to the necessary minimum. That means the source is mostly identical to the original. Besides the changes described above, more debug output was added.
NOTE: this patch only provides ORARemote
. The patches that add a
url2transport_path()
-method to LocalIO
and to HTTPRemoteIO
are contained in module datalad_next.patches.add_method_url2localpath
. The
reason to keep them separate is that the patch from module
datalad_next.patches.replace_create_sibling_ria
require them as well.
For SSHRemoteIO
the method is included in the patch definition of
SSHRemoteIO
, which is contained in the module
datalad_next.patches.replace_sshremoteio
.