swh.loader.svn.directory module#

Loader in charge of injecting tree at a specific revision.

class swh.loader.svn.directory.SvnExportLoader(*args, svn_paths: List[str] | None = None, svn_url: str | None = None, **kwargs)[source]#

Bases: BaseDirectoryLoader

Load a svn tree at a specific svn revision into the swh archive.

It is also possible to load a subset of the source tree by explicitly specifying the sub-paths to export in the svn_paths optional parameter.

If the origin URL should be different from the subversion URL, the latter can be provided using the optional svn_url parameter.

The output snapshot is of the form:

id: <bytes>
    target_type: alias
    target: rev_<svn-revision>
    target_type: directory
    target: <directory-id>
visit_type: str = 'svn-export'#
prepare() None[source]#
Second step executed by the loader to prepare some state needed by

the loader.


NotFound exception if the origin to ingest is not found.

cleanup() None[source]#

Clean up any intermediary fs.

fetch_artifact() Iterator[Path][source]#

Prepare the svn local repository checkout at a given commit/tag.

build_snapshot() Snapshot[source]#

Build snapshot without losing the svn revision context.