libvcs.sync.svn¶

For subversion, aka svn(1)

Tool to manage a local SVN (Subversion) working copy from a repository.

exception libvcs.sync.svn.SvnUrlRevFormattingError(data, *args)[source]¶

Bases: ValueError

Raised when SVN Revision output is not in the expected format.

Parameters:
Return type:

None

class libvcs.sync.svn.SvnSync(*, url, path, **kwargs)[source]¶

Bases: BaseSync

Tool to manage a local SVN (Subversion) working copy from a SVN repository.

Working copy of a SVN repository.

Parameters:
  • url (str) – URL in subversion repository

  • username (str, optional) – username to use for checkout and update

  • password (str, optional) – password to use for checkout and update

  • svn_trust_cert (bool) – trust the Subversion server site certificate, default False

  • path (Path)

  • kwargs (Any)

bin_name: str = 'svn'¶

VCS app name, e.g. ‘git’

schemes: tuple[str, ...] = ('svn', 'svn+ssh', 'svn+http', 'svn+https', 'svn+svn')¶

List of supported schemes to register in urlparse.uses_netloc

__init__(*, url, path, **kwargs)[source]¶

Working copy of a SVN repository.

Parameters:
  • url (str) – URL in subversion repository

  • username (str, optional) – username to use for checkout and update

  • password (str, optional) – password to use for checkout and update

  • svn_trust_cert (bool) – trust the Subversion server site certificate, default False

  • path (str | PathLike[str])

  • kwargs (Any)

Return type:

None

cmd: Svn¶
_user_pw_args()[source]¶
Return type:

list[Any]

obtain(quiet=None, *args, **kwargs)[source]¶

Check out a working copy from a SVN repository.

Return type:

None

Parameters:
get_revision_file(location)[source]¶

Return revision for a file.

Return type:

int

Parameters:

location (str)

get_revision(location=None)[source]¶

Return maximum revision for all files under a given location.

Return type:

int

Parameters:

location (str | None)

update_repo(dest=None, *args, **kwargs)[source]¶

Fetch changes from SVN repository to local working copy.

Return type:

None

Parameters:
classmethod _get_svn_url_rev(location)[source]¶
Return type:

tuple[Optional[str], int]

Parameters:

location (str)