incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r1169605 - /incubator/public/trunk/clutch.py
Date Mon, 12 Sep 2011 05:33:03 GMT
Author: crossley
Date: Mon Sep 12 05:33:02 2011
New Revision: 1169605

URL: http://svn.apache.org/viewvc?rev=1169605&view=rev
Log:
Better handle SVN detection by using resourceNames.

Modified:
    incubator/public/trunk/clutch.py

Modified: incubator/public/trunk/clutch.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch.py?rev=1169605&r1=1169604&r2=1169605&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Mon Sep 12 05:33:02 2011
@@ -695,21 +695,28 @@ for k in projectNames:
     print "INFO: %s: Does not yet have committers accounts" % k
 
   # Detect if they have SVN yet.
-  # First, try the url from their status page
-  # then, try a standard url.
+  # First, try the URL from their status page
+  # then, try URLs based on their resourceNames.
   if optionUseClutchState and projects[k]['hasClutchState'] and state[k]['urlSvn']:
     projects[k]['urlSvn'] = state[k]['urlSvn']
   else:
-    urlSvnDefault = "http://svn.apache.org/repos/asf/incubator/%s/" % projects[k]['statusFileName']
-    if urlSvnDefault == projects[k]['urlSvn']:
-      urlSvnDefault = ""
-    for url in [projects[k]['urlSvn'], urlSvnDefault]:
-      if url == "":
-        continue
+    urls = []
+    try:
+      projects[k]['urlSvn']
+    except:
+      pass
+    else:
+      if projects[k]['urlSvn'] != '':
+        urls.append(projects[k]['urlSvn'])
+    for name in projects[k]['resourceNames']:
+      urls.append("http://svn.apache.org/repos/asf/incubator/%s/" % name)
+    for url in urls:
+      if optionVerbose:
+        print 'DEBUG: Trying SVN URL %s' % url
       try:
         urllib2.urlopen(url)
       except IOError:
-        projects[k]['urlSvn'] = ""
+        projects[k]['urlSvn'] = ''
       else:
         projects[k]['urlSvn'] = url
         break



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message