gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: rev 53866 - in gump/live: metadata python/gump/build python/gump/core python/gump/document/xdocs python/gump/notify python/gump/rdf python/gump/syndication python/gump/test python/gump/threads python/gump/update python/gump/utils src/documentation/content/xdocs/metadata test
Date Wed, 06 Oct 2004 14:16:01 GMT
Author: ajack
Date: Wed Oct  6 07:16:00 2004
New Revision: 53866

Added:
   gump/live/metadata/FILLME
      - copied unchanged from rev 53820, gump/trunk/metadata/FILLME
Removed:
   gump/live/metadata/README
Modified:
   gump/live/python/gump/build/ant.py
   gump/live/python/gump/build/maven.py
   gump/live/python/gump/build/nant.py
   gump/live/python/gump/core/commandLine.py
   gump/live/python/gump/document/xdocs/documenter.py
   gump/live/python/gump/document/xdocs/resolver.py
   gump/live/python/gump/notify/notification.py
   gump/live/python/gump/notify/notifier.py
   gump/live/python/gump/rdf/describer.py
   gump/live/python/gump/syndication/abstract.py
   gump/live/python/gump/test/   (props changed)
   gump/live/python/gump/test/documenter.py
   gump/live/python/gump/test/updater.py
   gump/live/python/gump/threads/tools.py
   gump/live/python/gump/update/svn.py
   gump/live/python/gump/update/updater.py
   gump/live/python/gump/utils/sync.py
   gump/live/src/documentation/content/xdocs/metadata/ant.xml
   gump/live/src/documentation/content/xdocs/metadata/maven.xml
   gump/live/test/gumptest.sh
Log:
Merging some reason fixes/changes into live,
primarily the 'comma separated not space separated targets',
since we share metadata between test (TRUNK) and public (LIVE)
runs.


Modified: gump/live/python/gump/build/ant.py
==============================================================================
--- gump/live/python/gump/build/ant.py	(original)
+++ gump/live/python/gump/build/ant.py	Wed Oct  6 07:16:00 2004
@@ -157,7 +157,7 @@
     
         # End with the target (or targets)...
         if target: 
-            for targetParam in target.split():
+            for targetParam in target.split(','):
                 cmd.addParameter(targetParam)
     
         return cmd

Modified: gump/live/python/gump/build/maven.py
==============================================================================
--- gump/live/python/gump/build/maven.py	(original)
+++ gump/live/python/gump/build/maven.py	Wed Oct  6 07:16:00 2004
@@ -167,7 +167,7 @@
     
         # End with the goal...
         if goal: 
-            for goalParam in goal.split():
+            for goalParam in goal.split(','):
                 cmd.addParameter(goalParam)
     
         return cmd

Modified: gump/live/python/gump/build/nant.py
==============================================================================
--- gump/live/python/gump/build/nant.py	(original)
+++ gump/live/python/gump/build/nant.py	Wed Oct  6 07:16:00 2004
@@ -161,7 +161,7 @@
     
         # End with the target (or targets)...
         if target: 
-            for targetParam in target.split():
+            for targetParam in target.split(','):
                 cmd.addParameter(targetParam)
     
         return cmd

Modified: gump/live/python/gump/core/commandLine.py
==============================================================================
--- gump/live/python/gump/core/commandLine.py	(original)
+++ gump/live/python/gump/core/commandLine.py	Wed Oct  6 07:16:00 2004
@@ -175,9 +175,15 @@
             log.debug("Produced Argument : " + arg)
 
     def getArguments(self):
+        """
+        Get the primary arguments (workspace and project expression)
+        """
         return self.args
         
     def getOptions(self):
+        """
+        Get configured options (e.g. --debug).
+        """
         return self.options
 
 def handleArgv(argv, requireProject=1):

Modified: gump/live/python/gump/document/xdocs/documenter.py
==============================================================================
--- gump/live/python/gump/document/xdocs/documenter.py	(original)
+++ gump/live/python/gump/document/xdocs/documenter.py	Wed Oct  6 07:16:00 2004
@@ -277,26 +277,9 @@
         definitionTable.createEntry('Gump Run (Hex) GUID', self.run.getRunHexGuid())
         definitionTable.createEntry('Gump Version', setting.VERSION)
         
-        rssSyndRow=definitionTable.createRow()
-        rssSyndRow.createData().createStrong('Syndication')
-        rssArea=rssSyndRow.createData()
-        rssArea.createFork('rss.xml','RSS')
-        rssUrl=self.resolver.getUrl(self.workspace,'rss','.xml')
-        rssArea.createFork('http://www.feedvalidator.org/check.cgi?url=' + rssUrl) \
-                .createIcon(self.resolver.getImageUrl('valid-rss.png'), alt='[Valid RSS]')
#, title='Validate my RSS feed', width='88', height='31')
-                 
-        atomSyndRow=definitionTable.createRow()
-        atomSyndRow.createData().createStrong('Syndication')
-        atomArea=atomSyndRow.createData()
-        atomArea.createFork('atom.xml','Atom')
-        atomUrl=self.resolver.getUrl(self.workspace,'atom','.xml')
-        atomArea.createFork('http://www.feedvalidator.org/check.cgi?url=' + atomUrl) \
-                .createIcon(self.resolver.getImageUrl('valid-atom.png'), alt='[Valid Atom]')
#, title='Validate my Atom feed', width='88', height='31')
+        # RSS|Atom|RDF
+        self.documentXMLLinks(document, definitionTable, depth=getDepthForObject(self.workspace))
      
         
-        rdfSyndRow=definitionTable.createRow()
-        rdfSyndRow.createData().createStrong('Metadata')
-        rdfArea=rdfSyndRow.createData()
-        rdfArea.createFork('gump.rdf','RDF')
         #rdfUrl=self.resolver.getUrl(self.workspace,'gump','.rdf')
         #rdfArea.createFork('http://www.feedvalidator.org/check.cgi?url=' + rdfUrl) \
         #        .createIcon(self.resolver.getImageUrl('valid-rdf.png'), alt='[Valid Atom]')
#, title='Validate my Atom feed', width='88', height='31')
@@ -391,6 +374,37 @@
      
         document.serialize()    
         document=None
+       
+    def documentXMLLinks(self, document=None, table=None, rdf=True, depth=0):
+        """
+        
+        Show RSS|Atom|RDF.
+                
+        """
+        if not table:
+            table=document.createTable(['XML Description','Links'])
+            
+        rssSyndRow=table.createRow()
+        rssSyndRow.createData().createStrong('RSS Syndication')
+        rssArea=rssSyndRow.createData()
+        rssArea.createFork('rss.xml','RSS')
+        rssUrl=self.resolver.getUrl(self.workspace,'rss','.xml')
+        rssArea.createFork('http://www.feedvalidator.org/check.cgi?url=' + rssUrl) \
+                .createIcon(self.resolver.getImageUrl('valid-rss.png',depth), alt='[Valid
RSS]') #, title='Validate my RSS feed', width='88', height='31')
+                 
+        atomSyndRow=table.createRow()
+        atomSyndRow.createData().createStrong('Atom Syndication')
+        atomArea=atomSyndRow.createData()
+        atomArea.createFork('atom.xml','Atom')
+        atomUrl=self.resolver.getUrl(self.workspace,'atom','.xml')
+        atomArea.createFork('http://www.feedvalidator.org/check.cgi?url=' + atomUrl) \
+                .createIcon(self.resolver.getImageUrl('valid-atom.png',depth), alt='[Valid
Atom]') #, title='Validate my Atom feed', width='88', height='31')
+        
+        if rdf:
+            rdfRow=table.createRow()
+            rdfRow.createData().createStrong('RDF Metadata')
+            rdfArea=rdfRow.createData()
+            rdfArea.createFork('gump.rdf','RDF')
         
     def documentPartial(self,node):
             notice=node.createWarning()
@@ -1521,6 +1535,9 @@
         if metadataLocation and metadataUrl:  
             descriptionSection.createParagraph('Gump Metadata: ').createFork(metadataUrl,
metadataLocation)
             
+        # RSS|Atom
+        self.documentXMLLinks(document,None,False, depth=getDepthForObject(module))
+        
         if module.cause and not module==module.cause:
              self.insertTypedLink( module.cause, module, \
                  document.createNote( "This module failed due to: "))     
@@ -1759,7 +1776,10 @@
         metadataUrl=project.getMetadataViewUrl()
         if metadataLocation and metadataUrl:  
             detailsList.createEntry('Gump Metadata: ').createFork(metadataUrl, metadataLocation)
-                             
+        
+        # RSS|Atom|RDF
+        self.documentXMLLinks(document, depth=getDepthForObject(project))
+        
         self.documentStats(document,project,realTime)
                 
         self.documentFileList(document,project,'Project-level Files')  

Modified: gump/live/python/gump/document/xdocs/resolver.py
==============================================================================
--- gump/live/python/gump/document/xdocs/resolver.py	(original)
+++ gump/live/python/gump/document/xdocs/resolver.py	Wed Oct  6 07:16:00 2004
@@ -284,7 +284,7 @@
             location.setDocument(documentName)
         return concatenateUrl(self.rootUrl,location.serialize()) 
         
-    def getStateIconInformation(self,statePair):
+    def getStateIconInformation(self,statePair,depth=0):
         """
         	Get the URL (and ALT description) for a state pair
         """
@@ -299,7 +299,7 @@
         
         # Build the URL to the icon
         iconName=gumpSafeName(lower(replace(sname,' ','_')))
-        url = self.getIconUrl(iconName+'.png')
+        url = self.getIconUrl(iconName+'.png',depth)
         
         return (url, description)
         

Modified: gump/live/python/gump/notify/notification.py
==============================================================================
--- gump/live/python/gump/notify/notification.py	(original)
+++ gump/live/python/gump/notify/notification.py	Wed Oct  6 07:16:00 2004
@@ -1,6 +1,5 @@
 #!/usr/bin/env python
 # Copyright 2003-2004 The Apache Software Foundation
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -124,10 +123,10 @@
         
         if self.isFailure():        
             if affected:
-                stream.write('.\nThis issue affects ' + `affected` + ' projects')
+                stream.write('.\nThis issue affects %s projects' % affected)
             
             if duration and duration > 1:
-                stream.write(', and has been outstanding for ' + `duration` + ' runs')
+                stream.write(', and has been outstanding for %s runs' % duration)
         
         stream.write('.\n')
         

Modified: gump/live/python/gump/notify/notifier.py
==============================================================================
--- gump/live/python/gump/notify/notifier.py	(original)
+++ gump/live/python/gump/notify/notifier.py	Wed Oct  6 07:16:00 2004
@@ -270,7 +270,7 @@
                 
         # Form the subject
         subject=self.workspace.prefix+	\
-                ': '+module.getName()+' '+	\
+                ': Module '+module.getName()+' '+	\
                 lower(stateDescription(module.getState()))
                     
         if notification.isWarning():
@@ -289,9 +289,9 @@
         content=notification.resolveContent(self.resolver, self.getNextIdentifier())
                 
         # Form the subject
-        subject=self.workspace.prefix+': '	\
-            + module.getName() + '/' +project.getName()	\
-            +' '+lower(stateDescription(project.getState()))
+        subject=self.workspace.prefix+': Project '+ project.getName()	\
+            + ' (in Module ' + module.getName() + ') ' \
+            + lower(stateDescription(project.getState()))
             
         if notification.isWarning():
             subject += ', but with warnings.'

Modified: gump/live/python/gump/rdf/describer.py
==============================================================================
--- gump/live/python/gump/rdf/describer.py	(original)
+++ gump/live/python/gump/rdf/describer.py	Wed Oct  6 07:16:00 2004
@@ -191,7 +191,7 @@
         """
         Write to the generate store
         """
-        log.info('RDF : %s %s %s [%s]' % (subject,verb,predicate,comment))
+        log.debug('RDF : %s %s %s [%s]' % (subject,verb,predicate,comment))
         # Add to this store
         store.add((subject,verb,predicate))
         # Add globally

Modified: gump/live/python/gump/syndication/abstract.py
==============================================================================
--- gump/live/python/gump/syndication/abstract.py	(original)
+++ gump/live/python/gump/syndication/abstract.py	Wed Oct  6 07:16:00 2004
@@ -29,6 +29,7 @@
 from gump.model.state import *
 from gump.model.project import ProjectStatistics
 
+from gump.document.xdocs.resolver import getDepthForObject
 
 class AbstractSyndicator(RunSpecific):
     def __init__(self,run):
@@ -70,7 +71,7 @@
         
         content='<p>Project ' + project.getName()  + ', '
                                 
-        content += self.getStateContent(project.getStatePair())
+        content += self.getStateContent(project.getStatePair(), getDepthForObject(project))
                         
         content += 'Duration in state: <b>' + `stats.sequenceInState` + '</b>
(runs) '
         
@@ -104,7 +105,7 @@
         
         content='<p>Module ' + module.getName() + ', '
                                     
-        content += self.getStateContent(module.getStatePair())
+        content += self.getStateContent(module.getStatePair(), getDepthForObject(module))
         
         content += 'Duration in state: <b>' + `stats.sequenceInState`  + '</b>
(runs)'
                         
@@ -125,7 +126,7 @@
                 
         return content
 
-    def getStateContent(self,statePair):
+    def getStateContent(self,statePair,depth=0):
         """
             Construct the generic (HTML) contents for state
         """    
@@ -139,7 +140,7 @@
                 + statePair.getReasonDescription()
         
         content += ( '&nbsp;<img src=\'%s\' alt=\'%s\'/>' ) % \
-            resolver.getStateIconInformation(statePair)
+            resolver.getStateIconInformation(statePair,depth)
             
         content += '<br/><br/>'
         
@@ -179,14 +180,13 @@
         
         return content
 
-    #
-    # Only report once per state change
-    # Don't report on prereq failed, or if just came from that
-    # Don't report on packages
-    # Don't report on bogus states (testing)
-    #
     def moduleOughtBeWidelySyndicated(self, module):
-        
+        """
+        Only report once per state change
+    	Don't report on prereq failed, or if just came from that
+    	Don't report on packages
+    	Don't report on bogus states (testing)   
+        """        
         stats=module.getStats()
         
         return stats.sequenceInState == 1	\
@@ -199,14 +199,13 @@
                 stats.previousState == STATE_PREREQ_FAILED ) \
             and not module.isPackaged()       
               
-              
-    #
-    # Only report once per state change
-    # Don't report on prereq failed, or if just came from that
-    # Don't report on packages
-    # Don't report on bogus states (testing)
-    #
     def projectOughtBeWidelySyndicated(self, project):
+        """
+        Only report once per state change
+    	Don't report on prereq failed, or if just came from that
+    	Don't report on packages
+    	Don't report on bogus states (testing)
+        """
         
         stats=project.getStats()
         

Modified: gump/live/python/gump/test/documenter.py
==============================================================================
--- gump/live/python/gump/test/documenter.py	(original)
+++ gump/live/python/gump/test/documenter.py	Wed Oct  6 07:16:00 2004
@@ -26,7 +26,6 @@
 from gump.document.documenter import Documenter
 from gump.document.text.documenter import TextDocumenter
 from gump.document.xdocs.documenter import XDocDocumenter
-from gump.stats.statsdb import *
 from gump.test import getWorkedTestRun
 from gump.test.pyunit import UnitTestSuite
 
@@ -50,7 +49,7 @@
         out.close()
         
     def testXDocs(self):
-        xtest=os.path.join(dir.test,'xdocs')
+        xtest=os.path.join(gump.core.config.dir.test,'xdocs')
         if not os.path.exists(xtest): os.mkdir(xtest)
         documenter=XDocDocumenter(self.run,xtest,'http://someplace')
         documenter.document()

Modified: gump/live/python/gump/test/updater.py
==============================================================================
--- gump/live/python/gump/test/updater.py	(original)
+++ gump/live/python/gump/test/updater.py	Wed Oct  6 07:16:00 2004
@@ -23,7 +23,6 @@
 
 from gump import log
 import gump.core.config
-from gump.stats.statsdb import *
 from gump.test import getWorkedTestRun
 from gump.test.pyunit import UnitTestSuite
 

Modified: gump/live/python/gump/threads/tools.py
==============================================================================
--- gump/live/python/gump/threads/tools.py	(original)
+++ gump/live/python/gump/threads/tools.py	Wed Oct  6 07:16:00 2004
@@ -104,6 +104,6 @@
         # Try to acquire every count
         for i in range(self.count):    
             self.done.acquire() 
-            log.debug('Completed #' + `i` + '.')    
+            log.debug('Completed. Thread #' + `i` + '.')    
             
         log.debug('All threads completed.')    

Modified: gump/live/python/gump/update/svn.py
==============================================================================
--- gump/live/python/gump/update/svn.py	(original)
+++ gump/live/python/gump/update/svn.py	Wed Oct  6 07:16:00 2004
@@ -196,11 +196,10 @@
         """
             Build the appropriate SVN command for checkout/update
         """
-        
         repository=module.repository
         
-        log.debug("SubVersion  Module Update : " + module.getName() + \
-                       ", Repository Name: " + str(repository.getName()))
+        log.debug("SubVersion Module Update : " + module.getName() + \
+                       ", Repository Name: " + repository.getName())
                                         
         url=module.svn.getRootUrl()
       
@@ -251,8 +250,8 @@
         # If module name != SVN directory, tell SVN to put it into
         # a directory named after our module
         #
-        if module.svn.hasDir():
-            if not module.svn.getDir() == module.getName():
+        if not module.svn.hasDir() or \
+           not module.svn.getDir() == module.getName():
                 cmd.addParameter(module.getName())
         
         return (module.repository, url, cmd)

Modified: gump/live/python/gump/update/updater.py
==============================================================================
--- gump/live/python/gump/update/updater.py	(original)
+++ gump/live/python/gump/update/updater.py	Wed Oct  6 07:16:00 2004
@@ -183,7 +183,9 @@
                         
         except Exception, details:
             module.changeState(STATE_FAILED,REASON_SYNC_FAILED)
-            log.error('Synchronize Failed ' + str(details), exc_info=1)
+            message='Synchronize Failed: ' + str(details)
+            module.addError(message)
+            log.error(message, exc_info=1)
            
         return module.okToPerformWork()
         

Modified: gump/live/python/gump/utils/sync.py
==============================================================================
--- gump/live/python/gump/utils/sync.py	(original)
+++ gump/live/python/gump/utils/sync.py	Wed Oct  6 07:16:00 2004
@@ -176,8 +176,15 @@
         #
         #
         for name in names:
-            srcname = os.path.join(src, name)
-            dstname = os.path.join(dst, name)
+            try:    
+                srcname = os.path.join(src, name)
+                dstname = os.path.join(dst, name)
+            
+            except UnicodeDecodeError, why:
+                message = "Unicode Error. Can't copy [%s] in [%s] to [%s]: [%s]" % (`name`,
`src`, `dst`, str(why))
+                log.exception(message)
+                raise UnicodeDecodeError, message
+                
             try:
                 if symlinks and os.path.islink(srcname):
                     linkto = os.readlink(srcname)

Modified: gump/live/src/documentation/content/xdocs/metadata/ant.xml
==============================================================================
--- gump/live/src/documentation/content/xdocs/metadata/ant.xml	(original)
+++ gump/live/src/documentation/content/xdocs/metadata/ant.xml	Wed Oct  6 07:16:00 2004
@@ -47,7 +47,7 @@
       <tr>
         <td>target</td>
         <td>
-        	The ant target to invoke. <em>This can be a space separated list.</em>
+        	The ant target to invoke. <em>This can be a comma separated list. Spaces are
preserved.</em>
         </td>
         <td>No. Defaults to the default target defined by the build file.</td>
       </tr>

Modified: gump/live/src/documentation/content/xdocs/metadata/maven.xml
==============================================================================
--- gump/live/src/documentation/content/xdocs/metadata/maven.xml	(original)
+++ gump/live/src/documentation/content/xdocs/metadata/maven.xml	Wed Oct  6 07:16:00 2004
@@ -64,7 +64,7 @@
       </tr>
       <tr>
         <td>goal</td>
-        <td>The Maven goal to invoke.  <em>This can be a space separated list.</em></td>
+        <td>The Maven goal to invoke.  <em>This can be a comma separated list.
Spaces are preserved.</em></td>
         <td>No. Defaults to <strong>jar</strong>.</td>
       </tr>
     </table>

Modified: gump/live/test/gumptest.sh
==============================================================================
--- gump/live/test/gumptest.sh	(original)
+++ gump/live/test/gumptest.sh	Wed Oct  6 07:16:00 2004
@@ -40,14 +40,20 @@
 #
 cd python
 
+echo "--------------------------------------------------"
 echo "Run ... $GUMP_PYTHON gump/test/pyunit.py"
 $GUMP_PYTHON gump/test/pyunit.py
 
+echo "--------------------------------------------------"
 echo "Run the environment check"
 $GUMP_PYTHON ../bin/env.py
 
-echo "Run the workspace check"
-$GUMP_PYTHON ../bin/check.py -w ../metadata/test-workspace.xml all --debug
 
-echo "Run the workspace preview"
-$GUMP_PYTHON ../bin/preview.py -w ../metadata/test-workspace.xml all --debug
+echo "--------------------------------------------------"
+# echo "Run the Workspace check"
+# $GUMP_PYTHON ../bin/check.py -w ../metadata/test-workspace.xml all --debug
+
+
+echo "--------------------------------------------------"
+# echo "Run the Workspace preview"
+# $GUMP_PYTHON ../bin/preview.py -w ../metadata/test-workspace.xml all --debug

Mime
View raw message