incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: r1159074 - /incubator/public/trunk/clutch.py
Date Thu, 18 Aug 2011 08:06:46 GMT
Author: crossley
Date: Thu Aug 18 08:06:46 2011
New Revision: 1159074

URL: http://svn.apache.org/viewvc?rev=1159074&view=rev
Log:
Better way to deal with inconsistent names for project resources.

Modified:
    incubator/public/trunk/clutch.py

Modified: incubator/public/trunk/clutch.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/clutch.py?rev=1159074&r1=1159073&r2=1159074&view=diff
==============================================================================
--- incubator/public/trunk/clutch.py (original)
+++ incubator/public/trunk/clutch.py Thu Aug 18 08:06:46 2011
@@ -67,6 +67,7 @@ import datetime
 import HTMLParser
 import os.path
 import pickle
+import pprint
 import re
 import urllib2
 import xml.dom.minidom
@@ -205,6 +206,21 @@ for token in tokens:
   # If this still equals "month" at end, then there is a schedule error.
   projects[id]['reportingGroup'] = group
 
+  # Some projects use an alternate short resource name
+  # rather than their project name
+  if id == "zetacomponents":
+    projects[id]['resourceName'] = "zeta"
+  elif id == "beanvalidation":
+    projects[id]['resourceName'] = "bval"
+  elif id == "lucene.net":
+    projects[id]['resourceName'] = "lucene-net"
+  elif id == "manifoldcf":
+    projects[id]['resourceName'] = "connectors"
+  elif id == "openoffice.org":
+    projects[id]['resourceName'] = "ooo"
+  elif id == "odftoolkit":
+    projects[id]['resourceName'] = "odf"
+
 # End of processing the ReportingSchedule wiki page
 
 # Process the reporting schedule data, detect some potential issues.
@@ -497,7 +513,7 @@ for listName in mailLists.names:
         {'a': listName, 'b': projectMailLists[listName]["dev"]}
 if optionVerbose:
   print "DEBUG: projectMailLists"
-  print projectMailLists
+  pprint.pprint(projectMailLists)
 
 print "Gather incubator PGP keys data ..."
 keysNamesRE = re.compile("/dist/incubator/([^/]+)/(.*)")
@@ -757,11 +773,16 @@ for k in projectNames:
   # Detect if they have a PGP KEYS file
   if projects[k]['urlDist']:
     try:
-      keysList[projects[k]['resourceName']]
+      keysList[k]
     except KeyError:
-      print 'INFO: %s: Does not yet have a PGP KEYS file' % k
+      try:
+        keysList[projects[k]['resourceName']]
+      except KeyError:
+        print 'INFO: %s: Does not yet have a PGP KEYS file' % k
+      else:
+        projects[k]['urlKeys'] = keysList[projects[k]['resourceName']]
     else:
-      projects[k]['urlKeys'] = keysList[projects[k]['resourceName']]
+      projects[k]['urlKeys'] = keysList[k]
 
   # Detect mail lists established
   # First, try the list names from their status page
@@ -769,17 +790,7 @@ for k in projectNames:
   # To reduce network queries, if it is an incubator-hosted list then look up in
   # the list of mail-lists already gathered, otherwise it is a TLP-hosted list,
   # so try getting the archives URL.
-  projectName = k
-  if projectName.find("lucene.net") == 0:
-    projectName = "lucene-net"
-  if projectName.find("manifoldcf") == 0:
-    projectName = "connectors"
-  if projectName.find("openoffice.org") == 0:
-    projectName = "ooo"
-  if projectName.find("beanvalidation") == 0:
-    projectName = "bval"
-  if projectName.find("zetacomponents") == 0:
-    projectName = "zeta"
+  projectName = projects[k]['resourceName']
   for listType in ['dev', 'commits']:
     if listType == "dev":
       mailListHintKey = "hintMailListDev"



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


Mime
View raw message