swh.loader.svn.fast_crawler module#

C++ extension module for Python implementing a fast way to crawl a remote subversion repository content (aka listing all paths it contains and their properties) at a given revision. Unlike svn ls --depth infinity command it performs only one SVN request over the network, hence saving time especially with large repositories. Code is freely inspired from the fast-svn-crawler project from Dmitry Pavlenko, see https://sourceforge.net/projects/fastsvncrawler/ and http://vcs.atspace.co.uk/2012/07/15/subversion-remote-api-listing-repository-with-status-request/ for more details

swh.loader.svn.fast_crawler.crawl_repository(repo_url, revnum=-1, username='', password='')#

List remote subversion repository content at a given revision in a fast way.

Parameters:
  • repo_url (str) – URL of subversion repository to crawl

  • revnum (int) – revision number to crawl repository at, use HEAD by default if not provided

  • username (str) – optional username if repository access requires credentials

  • password (str) – optional password if repository access requires credentials

Returns:

A dictionary whose keys are repository paths and values dictionaries holding path type (file or dir) but also the subversion properties associated to it.

Return type:

Dict[str, Dict[str, Any]]

Raises:

RuntimeError – if an error occurs when calling subversion C API