[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - loader.py:1.11
svnloader.py:1.8
Fred L. Drake, Jr.
fred at zope.com
Thu May 6 13:35:44 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv767/zpkgtools
Modified Files:
loader.py svnloader.py
Log Message:
add general support for Subversion's svn+something: URL schemes
=== Packages/zpkgtools/zpkgtools/loader.py 1.10 => 1.11 ===
--- Packages/zpkgtools/zpkgtools/loader.py:1.10 Fri Apr 30 15:28:03 2004
+++ Packages/zpkgtools/zpkgtools/loader.py Thu May 6 13:35:13 2004
@@ -164,7 +164,15 @@
methodname = "load_" + type.replace("+", "_")
method = getattr(self, methodname, None)
if method is None:
- method = self.unknown_load
+ # This allows use to deal with any svn+* URLs;
+ # Subversion allows the svn+ namespace to be extended
+ # using configuration data, so we let Subversion tell
+ # us whether it knows what to do with it; it's pretty
+ # clear the user wants to use Subversion in this case.
+ if svnloader.is_subversion_url(url):
+ method = self.load_svn
+ else:
+ method = self.unknown_load
else:
raise ValueError("can only load from URLs, not path references")
path = method(url)
=== Packages/zpkgtools/zpkgtools/svnloader.py 1.7 => 1.8 ===
--- Packages/zpkgtools/zpkgtools/svnloader.py:1.7 Thu Apr 29 19:20:27 2004
+++ Packages/zpkgtools/zpkgtools/svnloader.py Thu May 6 13:35:13 2004
@@ -43,7 +43,9 @@
:rtype: bool
"""
type, rest = urllib.splittype(url)
- if type in ("svn", "svn+ssh"):
+ if not type:
+ return False
+ if type == "svn" or type.startswith("svn+"):
return True
if type == "file":
if not url.startswith("file://"):
More information about the Zope-CVS
mailing list