SVN URL Parser - libvcs.url.svn

Detect and parse Subversion URLs through SvnURL, aka svn(1).

Detect, parse, and validate SVN (Subversion) URLs.

Note

Subversion URL support is experimental. If you rely on these URL shapes in production, please verify them against your repositories and report gaps in the project tracker.

libvcs.url.svn.DEFAULT_RULES: list[Rule] = <...truncated, 638 chars>
data
data
libvcs.url.svn.DEFAULT_RULES: list[Rule] = <...truncated, 638 chars>

Core regular expressions. These are patterns understood by svn(1)

libvcs.url.svn.PIP_DEFAULT_RULES: list[Rule] = <...truncated, 516 chars>
data
data
libvcs.url.svn.PIP_DEFAULT_RULES: list[Rule] = <...truncated, 516 chars>

pip-style svn URLs.

Examples of PIP-style svn URLs (via pip.pypa.io):

MyProject @ svn+https://svn.example.com/MyProject
MyProject @ svn+ssh://svn.example.com/MyProject
MyProject @ svn+ssh://user@svn.example.com/MyProject

Refs (via pip.pypa.io):

MyProject @ -e svn+http://svn.example.com/svn/MyProject/trunk@2019
MyProject @ -e svn+http://svn.example.com/svn/MyProject/trunk@{20080101}

Notes

class libvcs.url.svn.SvnBaseURL
class libvcs.url.svn.SvnBaseURL

Bases: URLProtocol, SkipDefaultFieldsReprMixin

SVN repository location. Parses URLs on initialization.

Examples

>>> SvnBaseURL(
...     url='svn+ssh://svn.debian.org/svn/aliothproj/path/in/project/repository')
SvnBaseURL(url=svn+ssh://svn.debian.org/svn/aliothproj/path/in/project/repository,
       scheme=svn+ssh,
       hostname=svn.debian.org,
       path=svn/aliothproj/path/in/project/repository,
       rule=core-svn)
>>> myrepo = SvnBaseURL(
...     url='svn+ssh://svn.debian.org/svn/aliothproj/path/in/project/repository'
... )
>>> myrepo.hostname
'svn.debian.org'
>>> myrepo.path
'svn/aliothproj/path/in/project/repository'
class libvcs.url.svn.SvnPipURL
class libvcs.url.svn.SvnPipURL

Bases: SvnBaseURL, URLProtocol, SkipDefaultFieldsReprMixin

Supports pip svn URLs.

class libvcs.url.svn.SvnURL
class libvcs.url.svn.SvnURL

Bases: SvnPipURL, SvnBaseURL, URLProtocol, SkipDefaultFieldsReprMixin

Batteries included URL Parser. Supports svn(1) and pip URLs.

Ancestors (MRO) This URL parser inherits methods and attributes from the following parsers: