changeset 2474:b101999b1afa

SVNRepo plumbing.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Tue, 24 Oct 2006 13:51:21 +0100
parents ca8362c16096
children ce1650619d2c
files lib/gub.py
diffstat 1 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lib/gub.py	Tue Oct 24 13:51:09 2006 +0100
+++ b/lib/gub.py	Tue Oct 24 13:51:21 2006 +0100
@@ -626,25 +626,31 @@
     def with (self,
               branch='',
               version='',
+              module='',
               mirror=download.gnu,
               format='gz'):
 
         if mirror.startswith ('git:'):
+            self.url = mirror
             if 'http:' in mirror:
-                mirror = mirror[len ('git:'):]
+                self.url = mirror[len ('git:'):]
 
-            self.url = mirror
-            dir = self.settings.downloads + '/' + self.name() + '.git'
+            dir = self.settings.downloads + '/' + self.name () + '.git'
             self.vc_repository = gitrepo.GitRepository (dir)
 
             ## can't set vc_repository.system to self.system
             ## otherwise, we get into a loop [system -> expand -> checksum -> system]
         elif mirror.startswith (':pserver:'):
-            name = self.name()
-            self.url = mirror % locals()
-            
-            dir = '%s/%s.cvs' % (self.settings.downloads, name)
+            name = self.name ()
+            self.url = mirror % locals ()
+            dir = '%s/%s.cvs' % (self.settings.downloads, self.name ())
             self.vc_repository = gitrepo.CVSRepository (dir, self.name ())
+        elif mirror.startswith ('svn:'):
+            self.url = mirror
+            if 'http:' in mirror:
+                self.url = mirror[len ('svn:'):]
+            dir = '%s/%s.svn' % (self.settings.downloads, self.name ())
+            self.vc_repository = gitrepo.SVNRepository (dir, branch, module)
         else:
             self.url = mirror