swh.loader.svn.converters module#

swh.loader.svn.converters.svn_date_to_swh_date(strdate: bytes | None) TimestampWithTimezone[source]#

Convert a string date to an swh one.

  • strdate – A string representing a date with format like

  • b'YYYY-mm-DDTHH:MM:SS.800722Z'


An swh date format

swh.loader.svn.converters.svn_author_to_swh_person(author: bytes | None) Person[source]#

Convert an svn author to an swh person. Default policy: No information is added.


author – the svn author (in bytes)


a Person

swh.loader.svn.converters.build_swh_revision(rev: int, commit: Dict, repo_uuid: bytes, dir_id: bytes, parents: Sequence[bytes]) Revision[source]#

Given a svn revision, build a swh revision.

This adds an ‘extra-headers’ entry with the repository’s uuid and the svn revision.

  • rev – the svn revision number

  • commit – the commit data: revision id, date, author, and message

  • repo_uuid – The repository’s uuid

  • dir_id – the tree’s hash identifier

  • parents – the revision’s parents identifier


The swh revision dictionary.