[Blends-commit] [SCM] website branch, master, updated. 45ef7fe4b3df054de7fd75431ec888e9286b95ea

Andreas Tille tille at debian.org
Sun Dec 9 16:54:25 UTC 2012


The following commit has been merged in the master branch:
commit cd3b9f4814f58426acf69b7c7597c491c189c8f4
Author: Andreas Tille <tille at debian.org>
Date:   Mon Nov 26 21:15:14 2012 +0100

    There is no point in trying to retrieve tasks/ and debian/ dir separately with git because we do clone the whole repository (there is no other way)

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 53db378..58c9631 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -558,9 +558,9 @@ def FetchTasksFiles(data):
 
     # tasks directory to obtain dependencies and debian/control to obtain meta
     # information like the metapackage prefix
-    for dir in ('tasks', 'debian'):
-        # Checkout/Update tasks from SVN
-	if data['vcsdir'].startswith('svn:'):
+    # Checkout/Update tasks from SVN
+    if data['vcsdir'].startswith('svn:'):
+        for dir in ('tasks', 'debian'):
             tasksdir = data['datadir'] + '/' + dir
             if not os.access(tasksdir, os.W_OK):
                 try:
@@ -583,27 +583,27 @@ def FetchTasksFiles(data):
                     else:
                         logger.error("There are no old files in %s -> giving up" % tasksdir)
                         exit(-1)
-        elif data['vcsdir'].startswith('git:') or data['vcsdir'].startswith('http:'):
-            githtml = data['vcsdir']
-	    if githtml.startswith('git:'):
-		githtml=githtml.replace('git://','http://')
+    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'):
-		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)
+    	        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)
     return data['datadir'] + '/tasks'
 
 def RowDictionaries(cursor):

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list