swh.loader.git.converters module

Convert dulwich objects to dictionaries suitable for swh.storage

swh.loader.git.converters.dulwich_blob_to_content_id(blob) → Dict[str, Any][source]

Convert a dulwich blob to a Software Heritage content id

swh.loader.git.converters.dulwich_blob_to_content(blob, max_content_size=None)swh.model.model.BaseContent[source]

Convert a dulwich blob to a Software Heritage content

swh.loader.git.converters.dulwich_tree_to_directory(tree, log=None)swh.model.model.Directory[source]

Format a tree as a directory

swh.loader.git.converters.parse_author(name_email: bytes)swh.model.model.Person[source]

Parse an author line

swh.loader.git.converters.dulwich_tsinfo_to_timestamp(timestamp, timezone, timezone_neg_utc)swh.model.model.TimestampWithTimezone[source]

Convert the dulwich timestamp information to a structure compatible with Software Heritage

swh.loader.git.converters.dulwich_commit_to_revision(commit, log=None)swh.model.model.Revision[source]
swh.loader.git.converters.dulwich_tag_to_release(tag, log=None)swh.model.model.Release[source]