swh.loader.git.base module#

class swh.loader.git.base.BaseGitLoader(storage: StorageInterface, origin_url: str, logging_class: Optional[str] = None, save_data_path: Optional[str] = None, max_content_size: Optional[int] = None, lister_name: Optional[str] = None, lister_instance_name: Optional[str] = None, metadata_fetcher_credentials: Optional[Dict[str, Dict[str, List[Dict[str, str]]]]] = None)[source]#

Bases: BaseLoader

This base class is a pattern for both git loaders

Those loaders are able to load all the data in one go.

cleanup() None[source]#

Clean up an eventual state installed for computations.

has_contents() bool[source]#

Checks whether we need to load contents

get_contents() Iterable[BaseContent][source]#

Get the contents that need to be loaded

has_directories() bool[source]#

Checks whether we need to load directories

get_directories() Iterable[Directory][source]#

Get the directories that need to be loaded

has_revisions() bool[source]#

Checks whether we need to load revisions

get_revisions() Iterable[Revision][source]#

Get the revisions that need to be loaded

has_releases() bool[source]#

Checks whether we need to load releases

get_releases() Iterable[Release][source]#

Get the releases that need to be loaded

get_snapshot() Snapshot[source]#

Get the snapshot that needs to be loaded

eventful() bool[source]#

Whether the load was eventful

store_data() None[source]#

Store fetched data in the database.

Should call the maybe_load_xyz() methods, which handle the bundles sent to storage, rather than send directly.

visit_type: str#
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.