[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - loader.py:1.9
Fred L. Drake, Jr.
fred at zope.com
Tue Apr 27 14:51:01 EDT 2004
Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv15650/zpkgtools
Modified Files:
loader.py
Log Message:
revise the insertion of the right tag into a Subversion URL so it happens at
the right time; added tests
=== Packages/zpkgtools/zpkgtools/loader.py 1.8 => 1.9 ===
--- Packages/zpkgtools/zpkgtools/loader.py:1.8 Tue Apr 27 10:04:52 2004
+++ Packages/zpkgtools/zpkgtools/loader.py Tue Apr 27 14:50:30 2004
@@ -119,7 +119,14 @@
try:
parsed_url = cvsloader.parse(url)
except ValueError:
- pass
+ try:
+ parsed_url = svnloader.parse(url)
+ except ValueError:
+ pass
+ else:
+ if not parsed_url.tag:
+ parsed_url.tag = self.tag
+ url = parsed_url.getUrl()
else:
if not parsed_url.tag:
parsed_url.tag = self.tag
@@ -229,9 +236,6 @@
def load_svn(self, url):
if self.svnloader is None:
self.svnloader = svnloader.SubversionLoader()
- parsed_url = svnloader.parse(url)
- repo_url = cvsloader.RepositoryUrl(None, tag=self.tag)
- url = parsed_url.join(repo_url).getUrl()
tmp = tempfile.mkdtemp(prefix="svnloader-")
path = self.svnloader.load(url, tmp)
self.add_working_dir(url, tmp, path, True)
More information about the Zope-CVS
mailing list