[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - loader.py:1.12
Fred L. Drake, Jr.
fred at zope.com
Thu May 6 23:27:19 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv23400
Modified Files:
loader.py
Log Message:
added missing docstrings
=== Packages/zpkgtools/zpkgtools/loader.py 1.11 => 1.12 ===
--- Packages/zpkgtools/zpkgtools/loader.py:1.11 Thu May 6 13:35:13 2004
+++ Packages/zpkgtools/zpkgtools/loader.py Thu May 6 23:27:18 2004
@@ -343,12 +343,40 @@
def parse(url):
+ """Parse a revision-control URL.
+
+ This can handle ``cvs:``, ``repository:``, and all supported
+ Subversion URL types.
+
+ :param url: URL to be parsed.
+ :type url: `str`
+
+ :return: Parsed URL object.
+
+ :raises ValueError: If `url` can't be handled as a supported URL
+ type.
+ """
try:
return cvsloader.parse(url)
except ValueError:
return svnloader.parse(url)
def join(base, relurl):
+ """Join a base and relative URL.
+
+ :param base: Base URL.
+ :type base: `str`
+
+ :param relurl: Absolute or relative URL.
+ :type relurl: `str`
+
+ :return: The joined URL. This will be `relurl` if `relurl` is not
+ a ``repository:`` URL.
+ :rtype: `str`
+
+ :raises ValueError: If either `base` or `relurl` are not
+ revision-control URLs.
+ """
r = parse(relurl)
if isinstance(r, cvsloader.RepositoryUrl):
b = parse(base)
More information about the Zope-CVS
mailing list