The following commit has been merged in the master branch:
commit 46d5ebffbf0b4c1b854c217ccd683b168134ce8a
Author: Andreas Tille <[email protected]>
Date:   Mon Nov 26 21:07:59 2012 +0100

    Use full URL to Vcs (either SVN or Git) in config files; enable parsing SVN 
or Git for storing tasks files

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 98436bb..53db378 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -559,14 +559,14 @@ def FetchTasksFiles(data):
     # tasks directory to obtain dependencies and debian/control to obtain meta
     # information like the metapackage prefix
     for dir in ('tasks', 'debian'):
-        tasksdir = data['datadir'] + '/' + dir
-        if not os.access(tasksdir, os.W_OK):
-            try:
-               os.makedirs(tasksdir)
-            except:
-               logger.error("Unable to create data directory", tasksdir)
         # Checkout/Update tasks from SVN
        if data['vcsdir'].startswith('svn:'):
+            tasksdir = data['datadir'] + '/' + dir
+            if not os.access(tasksdir, os.W_OK):
+                try:
+                    os.makedirs(tasksdir)
+                except:
+                    logger.error("Unable to create data directory", tasksdir)
            svncommand = "svn %%s %s/%s %s >> /dev/null" % (data['vcsdir'], 
dir, tasksdir)
            if os.path.isdir(tasksdir+'/.svn'):
                svncommand = svncommand % ' --accept theirs-conflict up'
@@ -583,9 +583,24 @@ def FetchTasksFiles(data):
                     else:
                         logger.error("There are no old files in %s -> giving 
up" % tasksdir)
                         exit(-1)
-        elif data['vcsdir'].startswith('git:'):
-           print "Checkout Git repository from", data['vcsdir']
-           exit(-1)
+        elif data['vcsdir'].startswith('git:') or 
data['vcsdir'].startswith('http:'):
+            githtml = data['vcsdir']
+           if githtml.startswith('git:'):
+               githtml=githtml.replace('git://','http://')
+           if os.path.isdir(data['datadir']+'/.git'):
+               gitcommand = "cd %s; git pull" % data['datadir']
+           else:
+               gitcommand = "cd %s; git clone %s" % (re.sub('/[^/]+$', '', 
data['datadir']), githtml)
+            if os.system(gitcommand):
+               logger.error("Git command %s failed" % (gitcommand))
+               if os.path.isdir(data['datadir']+'/.git'):
+                   logger.error("Trying old files in %s ..." % data['datadir'])
+               else:
+                    if os.listdir(data['datadir']+'/'+dir):
+                        logger.warning("No .git directory found in %s but 
trying those random files there as tasks files." % data['datadir']+'/'+dir)
+                    else:
+                        logger.error("There are no old files in %s -> giving 
up" % data['datadir'])
+                        exit(-1)
         else:
             logger.error("Don't know how to checkout tasks files from %s -> 
giving up" % data['vcsdir'])
             exit(-1)
diff --git a/webtools/webconf/debian-accessibility.conf 
b/webtools/webconf/debian-accessibility.conf
index fc900e8..2440c2c 100644
--- a/webtools/webconf/debian-accessibility.conf
+++ b/webtools/webconf/debian-accessibility.conf
@@ -6,6 +6,6 @@ AliothUrl:   http://alioth.debian.org/projects/accessibility
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/accessibility
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/accessibility
-VcsDir:      /svn/blends/projects/accessibility/trunk/debian-accessibility
+VcsDir:      
svn://svn.debian.org/svn/blends/projects/accessibility/trunk/debian-accessibility
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-edu.conf b/webtools/webconf/debian-edu.conf
index 6e6e5dc..59fa5b6 100644
--- a/webtools/webconf/debian-edu.conf
+++ b/webtools/webconf/debian-edu.conf
@@ -7,7 +7,7 @@ ProjectList: [email protected]
 LogoUrl:     http://blends.alioth.debian.org/edu/img/slx-tux.png
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/edu
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/edu
-#VcsDir:      /svn/blends/projects/edu/trunk/debian-edu
+#VcsDir:      svn://svn.debian.org/svn/blends/projects/edu/trunk/debian-edu
 VcsDir:      /svn/debian-edu/branches/wheezy/debian-edu
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-ezgo.conf 
b/webtools/webconf/debian-ezgo.conf
index 555fa51..5f3a7ad 100644
--- a/webtools/webconf/debian-ezgo.conf
+++ b/webtools/webconf/debian-ezgo.conf
@@ -6,6 +6,6 @@ AliothUrl:   http://debian-ezgo.alioth.debian.org/
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/ezgo
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/ezgo
-VcsDir:      /svn/blends/projects/ezgo/trunk/debian-ezgo
+VcsDir:      svn://svn.debian.org/svn/blends/projects/ezgo/trunk/debian-ezgo
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-games.conf 
b/webtools/webconf/debian-games.conf
index ebe9e09..628c371 100644
--- a/webtools/webconf/debian-games.conf
+++ b/webtools/webconf/debian-games.conf
@@ -6,6 +6,6 @@ AliothUrl:
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/games
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/games
-VcsDir:      /svn/blends/projects/games/trunk/debian-games
+VcsDir:      svn://svn.debian.org/svn/blends/projects/games/trunk/debian-games
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-gis.conf b/webtools/webconf/debian-gis.conf
index cb83974..3b08fd0 100644
--- a/webtools/webconf/debian-gis.conf
+++ b/webtools/webconf/debian-gis.conf
@@ -8,6 +8,6 @@ LogoUrl:     
http://blends.alioth.debian.org/gis/img/debiangis_mollweide.png
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/gis
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/gis
 X-Old-VcsDir:      /svn/pkg-grass/packages/debian-gis
-VcsDir:      /svn/blends/projects/gis/trunk/debian-gis
+VcsDir:      svn://svn.debian.org/svn/blends/projects/gis/trunk/debian-gis
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-imaging.conf 
b/webtools/webconf/debian-imaging.conf
index edc6c44..d9c707d 100644
--- a/webtools/webconf/debian-imaging.conf
+++ b/webtools/webconf/debian-imaging.conf
@@ -6,6 +6,6 @@ AliothUrl:   http://blends.alioth.debian.org/imaging
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/imaging
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/debian-imaging
-VcsDir:      /svn/blends/projects/imaging/trunk/debian-imaging
+VcsDir:      
svn://svn.debian.org/svn/blends/projects/imaging/trunk/debian-imaging
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-junior.conf 
b/webtools/webconf/debian-junior.conf
index 3703e89..084cd76 100644
--- a/webtools/webconf/debian-junior.conf
+++ b/webtools/webconf/debian-junior.conf
@@ -6,6 +6,6 @@ AliothUrl:
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/junior
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/junior
-VcsDir:      /svn/blends/projects/junior/trunk/debian-junior
+VcsDir:      
svn://svn.debian.org/svn/blends/projects/junior/trunk/debian-junior
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-lex.conf b/webtools/webconf/debian-lex.conf
index 8adb944..cab6b54 100644
--- a/webtools/webconf/debian-lex.conf
+++ b/webtools/webconf/debian-lex.conf
@@ -6,6 +6,6 @@ AliothUrl:   http://blends.alioth.debian.org/lex
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/lex
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/lex
-VcsDir:      /svn/blends/projects/lex/trunk/debian-lex
+VcsDir:      svn://svn.debian.org/svn/blends/projects/lex/trunk/debian-lex
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-med.conf b/webtools/webconf/debian-med.conf
index b4d8386..ae2c7e7 100644
--- a/webtools/webconf/debian-med.conf
+++ b/webtools/webconf/debian-med.conf
@@ -8,7 +8,7 @@ LogoUrl:     http://debian-med.alioth.debian.org/img/logo.png
 Ignore:      alternative Logo: 
http://people.debian.org/~tille/debian-med/logos/med-06.jpg
 OutputDir:   /var/lib/gforge/chroot/home/groups/debian-med/htdocs
 DataDir:     /var/lib/gforge/chroot/home/groups/debian-med/data
-VcsDir:      /svn/blends/projects/med/trunk/debian-med
+VcsDir:      svn://svn.debian.org/svn/blends/projects/med/trunk/debian-med
 CSS:         ../inc/style.css
 Advertising: _('Help us to see Debian used by medical practitioners and 
biomedical researchers! Join us on the <a 
href=\"http://alioth.debian.org/projects/debian-med\";>Alioth page</a>.')
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-multimedia.conf 
b/webtools/webconf/debian-multimedia.conf
index 305007e..c8a6501 100644
--- a/webtools/webconf/debian-multimedia.conf
+++ b/webtools/webconf/debian-multimedia.conf
@@ -6,6 +6,6 @@ AliothUrl:   http://blends.alioth.debian.org/multimedia
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/multimedia
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/debian-multimedia
-VcsDir:      /svn/blends/projects/multimedia/trunk/debian-multimedia
+VcsDir:      
svn://svn.debian.org/svn/blends/projects/multimedia/trunk/debian-multimedia
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debian-pan.conf b/webtools/webconf/debian-pan.conf
index dda916b..c4c54e2 100644
--- a/webtools/webconf/debian-pan.conf
+++ b/webtools/webconf/debian-pan.conf
@@ -6,7 +6,7 @@ AliothUrl:   http://alioth.debian.org/projects/debian-science
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/pan
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/pan
-VcsDir:      /svn/blends/projects/pan/trunk/debian-pan
+VcsDir:      svn://svn.debian.org/svn/blends/projects/pan/trunk/debian-pan
 CSS:         ../inc/style.css
 PkgList:     [email protected]
 DehsMail:    [email protected]
diff --git a/webtools/webconf/debian-science.conf 
b/webtools/webconf/debian-science.conf
index e5f0fa7..9b4549e 100644
--- a/webtools/webconf/debian-science.conf
+++ b/webtools/webconf/debian-science.conf
@@ -6,7 +6,7 @@ AliothUrl:   http://alioth.debian.org/projects/debian-science
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/science
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/science
-VcsDir:      /svn/blends/projects/science/trunk/debian-science
+VcsDir:      
svn://svn.debian.org/svn/blends/projects/science/trunk/debian-science
 CSS:         ../inc/style.css
 PkgList:     [email protected]
 DehsMail:    [email protected]
diff --git a/webtools/webconf/debichem.conf b/webtools/webconf/debichem.conf
index c1062ae..ab5f011 100644
--- a/webtools/webconf/debichem.conf
+++ b/webtools/webconf/debichem.conf
@@ -6,6 +6,6 @@ AliothUrl:   http://alioth.debian.org/projects/debichem
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/debichem
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/debichem
-VcsDir:      /svn/blends/projects/debichem/trunk/debichem
+VcsDir:      svn://svn.debian.org/svn/blends/projects/debichem/trunk/debichem
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/debug.conf b/webtools/webconf/debug.conf
index cb551d0..9e0d5df 100644
--- a/webtools/webconf/debug.conf
+++ b/webtools/webconf/debug.conf
@@ -6,6 +6,6 @@ AliothUrl:   http://alioth.debian.org/projects/blends
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/debug
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/debug
-VcsDir:      /svn/blends/projects/debug
+VcsDir:      git://git.debian.org/git/blends/projects/debug.git
 CSS:         ../inc/style.css
 PkgList:     [email protected]
diff --git a/webtools/webconf/rest-test.conf b/webtools/webconf/rest-test.conf
index 869b9e5..d62f113 100644
--- a/webtools/webconf/rest-test.conf
+++ b/webtools/webconf/rest-test.conf
@@ -6,7 +6,7 @@ AliothUrl:   http://alioth.debian.org/projects/blends
 ProjectList: [email protected]
 OutputDir:   /var/lib/gforge/chroot/home/groups/blends/htdocs/rest-test
 DataDir:     /var/lib/gforge/chroot/home/groups/blends/data/rest-test
-VcsDir:      /svn/blends/projects/debug
+VcsDir:      svn://svn.debian.org/svn/blends/projects/debug
 CSS:         ../inc/style.css
 PkgList:     [email protected]
 RenderingLib: rest

-- 
Static and dynamic websites for Debian Pure Blends

_______________________________________________
Blends-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/blends-commit

Reply via email to