swh.loader.svn.directory module#

Loader in charge of injecting tree at a specific revision.

class swh.loader.svn.directory.SvnExportLoader(*args, **kwargs)[source]#

Bases: BaseDirectoryLoader

Svn export (of a tree) loader at a specific svn revision or tag (release) into the swh archive.

The output snapshot is of the form:

id: <bytes>
branches:
  HEAD:
    target_type: alias
    target: rev_<svn-revision>
  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.

Raises

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.

origin: Origin#
loaded_snapshot_id: Optional[bytes]#
parent_origins: Optional[List[Origin]]#

If the given origin is a “forge fork” (ie. created with the “Fork” button of GitHub-like forges), build_extrinsic_origin_metadata() sets this to a list of origins it was forked from; closest parent first.

snapshot: Optional[model.Snapshot]#
artifact_path: Optional[Path]#
mirror_urls: List[str]#
directory: Optional[from_disk.Directory]#
cnts: List[model.Content]#
skipped_cnts: List[model.SkippedContent]#
dirs: List[model.Directory]#