SVN URL Parser - libvcs.url.svn¶
Detect and parse Subversion URLs through
SvnURL, aka
svn(1).
Detect, parse, and validate SVN (Subversion) URLs.
Detect:
SvnURL.is_valid()Parse:
SvnURLcompare to
urllib.parse.ParseResultOutput
svn(1)URL:SvnURL.to_url()
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.
Core regular expressions. These are patterns understood by
svn(1)
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,SkipDefaultFieldsReprMixinSVN 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'
Compatibility checking:
SvnBaseURL.is_valid()URLs compatible with
svn(1):SvnBaseURL.to_url()
-
class libvcs.url.svn.SvnPipURL¶class libvcs.url.svn.SvnPipURL¶
Bases:
SvnBaseURL,URLProtocol,SkipDefaultFieldsReprMixinSupports pip svn URLs.
-
class libvcs.url.svn.SvnURL¶class libvcs.url.svn.SvnURL¶
Bases:
SvnPipURL,SvnBaseURL,URLProtocol,SkipDefaultFieldsReprMixinBatteries included URL Parser. Supports svn(1) and pip URLs.
Ancestors (MRO) This URL parser inherits methods and attributes from the following parsers: