ajack       2004/04/13 08:59:25

  Modified:    python/gump/model project.py module.py rawmodel.py server.py
                        repository.py
               python/gump/document forrest.py
               python/gump/utils __init__.py xmlutils.py
               server   lsd.xml try.xml
               python/gump engine.py
               .        commitCheck.py
  Log:
  1) Steps towards respecting <redistributable/>

  2) Notes on Servers

  3) Presentation tweaks
  
  Revision  Changes    Path
  1.75      +13 -3     gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- project.py        12 Apr 2004 18:57:36 -0000      1.74
  +++ project.py        13 Apr 2004 15:59:24 -0000      1.75
  @@ -253,6 +253,11 @@
           
       def getJarAt(self,index):
           return self.jars.values()[index]
  +                
  +    def isRedistributable(self):
  +        # Existence means 'true'
  +        return hasattr(self.xml,'redistributable') \
  +            or (self.module and self.module.isRedistributable())
           
       def hasReports(self):
           if self.reports: return 1
  @@ -332,18 +337,23 @@
           # Import any <ant part [if not packaged]
           if self.xml.ant and not packaged:
               self.ant = Ant(self.xml.ant,self)
  +            
  +            # Copy over any XML errors/warnings
  +            transferAnnotations(self.xml.ant, self)
           
           # Import any <maven part [if not packaged]
           if self.xml.maven and not packaged:
               self.maven = Maven(self.xml.maven,self)
               
  -        # Import any <maven part [if not packaged]
  -        if self.xml.maven and not packaged:
  -            self.maven = Maven(self.xml.maven,self)
  +            # Copy over any XML errors/warnings
  +            transferAnnotations(self.xml.maven, self)
               
           # Import any <script part [if not packaged]
           if self.xml.script and not packaged:
               self.script = Script(self.xml.script,self)
  +            
  +            # Copy over any XML errors/warnings
  +            transferAnnotations(self.xml.script, self)
           
           # Set this up to be the base directory of this project,
           # if one is set
  
  
  
  1.41      +6 -0      gump/python/gump/model/module.py
  
  Index: module.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/module.py,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- module.py 3 Apr 2004 17:32:18 -0000       1.40
  +++ module.py 13 Apr 2004 15:59:24 -0000      1.41
  @@ -363,6 +363,12 @@
       def setPackaged(self,packaged):
           self.packaged=packaged
           
  +        
  +    def isRedistributable(self):
  +        # Existence means 'true'
  +        return hasattr(self.xml,'redistributable') \
  +            or (self.repository and self.repository.isRedistributable())
  +        
       #
       # Get a full list of all the projects that depend
       # upon projects in this module 
  
  
  
  1.20      +1 -0      gump/python/gump/model/rawmodel.py
  
  Index: rawmodel.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/rawmodel.py,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- rawmodel.py       28 Mar 2004 18:58:05 -0000      1.19
  +++ rawmodel.py       13 Apr 2004 15:59:24 -0000      1.20
  @@ -114,6 +114,7 @@
       self.title=Single(GumpXMLModelObject)
       self.url=Single(GumpXMLModelObject)
       self.site=Single(GumpXMLModelObject)
  +    self.note=Single(GumpXMLModelObject)
       
   # represents a <tracker/> element
   class XMLTracker(Named):
  
  
  
  1.16      +6 -0      gump/python/gump/model/server.py
  
  Index: server.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/server.py,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- server.py 11 Apr 2004 15:18:43 -0000      1.15
  +++ server.py 13 Apr 2004 15:59:24 -0000      1.16
  @@ -64,6 +64,12 @@
       def getUrl(self):
           return str(self.xml.url)
           
  +    def hasNote(self):
  +        return hasattr(self.xml,'note') and self.xml.note
  +           
  +    def getNote(self):
  +        return str(self.xml.note)
  +        
       def hasResultsUrl(self):
           return self.isPython() and self.hasUrl()
           
  
  
  
  1.11      +3 -1      gump/python/gump/model/repository.py
  
  Index: repository.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/repository.py,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- repository.py     16 Mar 2004 19:50:15 -0000      1.10
  +++ repository.py     13 Apr 2004 15:59:24 -0000      1.11
  @@ -95,7 +95,9 @@
       def hasCvsWeb(self): 
           return hasattr(self.xml,'cvsweb') and self.xml.cvsweb
   
  -    # :TODO: Redistributable...
  +    def isRedistributable(self):
  +        # Existence means 'true'
  +        return hasattr(self.xml,'redistributable')
           
       def hasUser(self): return hasattr(self,'user')
       def hasPassword(self): return hasattr(self,'password')
  
  
  
  1.145     +29 -17    gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
  retrieving revision 1.144
  retrieving revision 1.145
  diff -u -r1.144 -r1.145
  --- forrest.py        12 Apr 2004 21:39:58 -0000      1.144
  +++ forrest.py        13 Apr 2004 15:59:25 -0000      1.145
  @@ -403,12 +403,8 @@
           
           self.documentProperties(detailsSection, workspace, 'Workspace Properties')
           
  -        # Does this workspace send nag mails?
  -        if workspace.isNag():
  -            nag='true'
  -        else:
  -            nag='false'
  -        detailsTable.createEntry("Send Nag E-mails: ", nag)
  +        # Does this workspace send notification (nag) mails?
  +        detailsTable.createEntry("Send Nag E-mails: ", 
getBooleanString(workspace.isNag()))
           
           #document.createRaw('<p><strong>Context Tree:</strong> <link 
href=\'workspace.html\'>workspace</link></p>')
           # x.write('<p><strong>Workspace Config:</strong> <link 
href=\'xml.txt\'>XML</link></p>')
  @@ -455,7 +451,7 @@
               self.resolver.getFile(workspace,'servers'))
                   
           serversSection=document.createSection('All Servers')
  -        serversTable=serversSection.createTable(['Name','Results','Start 
(Local)','Start (UTC)','End (UTC)'])
  +        serversTable=serversSection.createTable(['Name','Notes','Results','Start 
(Local)','Start (UTC)','End (UTC)'])
   
           scount=0
           for server in sortedServerList:
  @@ -466,6 +462,11 @@
               serverRow.createComment(server.getName())
                          
               self.insertLink( server, workspace, serverRow.createData())
  +                                        
  +            if server.hasNote():
  +                serverTow.createData(server.getNote())
  +            else:
  +                serverRow.createData('')
               
               if server.hasResultsUrl():
                   serverRow.createData().createFork(   \
  @@ -475,8 +476,7 @@
                   serverRow.createData('Not Available')
                   
               if server.hasResults():
  -                serverRow.createData(server.getResults().getStartDateTime() + ' ' + 
\
  -                                        server.getResults().getTimezone())
  +                serverRow.createData(server.getResults().getStartDateTime())
                   serverRow.createData(server.getResults().getStartDateTimeUtc())
                   serverRow.createData(server.getResults().getEndDateTimeUtc())
               else:
  @@ -1089,6 +1089,8 @@
               
           if repo.hasHostname():
               detailList.createEntry('Hostname: ', repo.getHostname())
  +            
  +        detailList.createEntry('Redistributable: ', 
getBooleanString(repo.isRedistributable()))
       
           self.documentXML(document,repo)
           
  @@ -1361,10 +1363,14 @@
                        repoList.createEntry( "SVN Directory: ", module.svn.getDir()) 
                   repoList.createEntry( "SVN URL: ", module.svn.getRootUrl())         
        
   
  -            if module.hasJars():
  -                if module.jars.hasUrl():
  -                     repoList.createEntry( "Jars URL: ", module.jars.getUrl())      
           
   
  +            repoList.createEntry('Redistributable: ', 
getBooleanString(module.isRedistributable()))
  +                
  +            if module.isRedistributable():
  +        
  +                if module.hasJars():
  +                    if module.jars.hasUrl():
  +                         repoList.createEntry( "Jars URL: ", module.jars.getUrl())  
               
                   
              
       #   x.write('<p><strong>Module Config :</strong> <link 
href=\'xml.html\'>XML</link></p>')
  @@ -1453,6 +1459,8 @@
               
           e = secsToElapsedTimeString(project.getElapsedSecs())
           if e and project.isVerboseOrDebug(): detailsList.createEntry("Elapsed: ", e)
  +                
  +        detailsList.createEntry('Redistributable: ', 
getBooleanString(project.isRedistributable()))                
                                                         
           # Display nag information
           if project.xml.nag:
  @@ -1759,8 +1767,12 @@
           if not servers: return    
           if len(servers) == 1: return # Assume this one.     
           
  -        serversSection=xdocNode.createSection('Servers')  
  -        serversSection.createParagraph('These links represent this location (and, 
when available, the status) on other servers.')      
  +        # Hack to keep 'tighter' in diffsLog page
  +        serversSection=xdocNode
  +        if -1 == depth:
  +            serversSection=xdocNode.createSection('Servers')  
  +            serversSection.createParagraph('These links represent this location 
(and, when available, the status and time) on other servers.')
  +            
           serversTable=serversSection.createTable()
           serverRow=serversTable.createRow()
           
  @@ -1898,7 +1910,7 @@
           for work in worklist:
               if isinstance(work,CommandWorkItem):      
                   if not STATE_SUCCESS == work.state:
  -                    tail=work.tail(50,'...<br/>','    ',100)
  +                    tail=work.tail(50,100,'...\n','    ')
                       if tail:
                           #
                           # Write out the 'tail'
  @@ -2027,7 +2039,7 @@
                           line=o.readline()
                           while line:
                               
  -                            line=wrapLine(line,100,'...<br/>','    ')
  +                            line=wrapLine(line,100,'...\n','    ')
                               
                               length = len(line)
                               size += length
  @@ -2127,7 +2139,7 @@
                               line=o.readline()
                               while line:
                               
  -                                line=wrapLine(line,100,'...<br/>','    ')
  +                                line=wrapLine(line,100,'...\n','    ')
                               
                                   length = len(line)
                                   size += length
  
  
  
  1.30      +4 -0      gump/python/gump/utils/__init__.py
  
  Index: __init__.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/__init__.py,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- __init__.py       12 Apr 2004 18:57:36 -0000      1.29
  +++ __init__.py       13 Apr 2004 15:59:25 -0000      1.30
  @@ -256,6 +256,10 @@
       
       return diffString
       
  +def getBooleanString(bool):
  +    if bool: return 'True'
  +    return 'False'
  +    
   #
   # Get into ASCII, but make an attempt at coping with
   # non-ASCII
  
  
  
  1.14      +2 -2      gump/python/gump/utils/xmlutils.py
  
  Index: xmlutils.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/xmlutils.py,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- xmlutils.py       18 Mar 2004 23:33:10 -0000      1.13
  +++ xmlutils.py       13 Apr 2004 15:59:25 -0000      1.14
  @@ -161,9 +161,9 @@
         if isinstance(attr,Single): return attr(attrs)
         if isinstance(attr,Multiple): return attr(attrs)
         
  -      # Simple attributes
  -      
  +      # Simple attributes      
         return attr # :TODO: Get this checked out
  +      
       except AttributeError:
         # It is OK if people extend the GOM...
         message="No metadata related to tag '%s' on %s" % \
  
  
  
  1.4       +1 -0      gump/server/lsd.xml
  
  Index: lsd.xml
  ===================================================================
  RCS file: /home/cvs/gump/server/lsd.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- lsd.xml   2 Mar 2004 22:55:08 -0000       1.3
  +++ lsd.xml   13 Apr 2004 15:59:25 -0000      1.4
  @@ -20,4 +20,5 @@
     <title>Leo Simmons (LSD)</title>
     <url>http://lsd.student.utwente.nl/gump</url>
     <site>http://lsd.student.utwente.nl/</site>
  +  <note>Primary, server which send notification e-mails.</note>
   </server>
  
  
  
  1.2       +1 -0      gump/server/try.xml
  
  Index: try.xml
  ===================================================================
  RCS file: /home/cvs/gump/server/try.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- try.xml   2 Mar 2004 22:55:08 -0000       1.1
  +++ try.xml   13 Apr 2004 15:59:25 -0000      1.2
  @@ -20,4 +20,5 @@
     <title>TrySybase</title>
     <url>http://gump.try.sybase.com</url>
     <site>http://www.try.sybase.com</site>
  +  <note>Often used for testing</note>
   </server>
  
  
  
  1.101     +14 -14    gump/python/gump/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/engine.py,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- engine.py 12 Apr 2004 18:57:37 -0000      1.100
  +++ engine.py 13 Apr 2004 15:59:25 -0000      1.101
  @@ -609,22 +609,22 @@
                                   message='Failed to publish license [' + licensePath 
+ '] to repository : ' + str(details)
                                   project.addError(message)
                                   log.error(message)                     
  -                    else:
  -                        project.addWarning('No license on project with outputs.')   
                                     
  +                    elif project.isRedistributable():
  +                        project.addWarning('No license on redistributable project 
with outputs.')                                        
                                       
                   if outputsOk: 
  -                    # Publish them all (if distributable)
  -                    # :TODO: check for distributable...
  -                    for jar in project.getJars():
  -                        # :TODO: Relative to module source?
  -                        jarPath=os.path.abspath(jar.getPath())
  -                        # Copy to repository
  -                        try:
  -                            repository.publish( project.getModule().getName(), 
jarPath )           
  -                        except Exception, details:
  -                            message='Failed to publish [' + jarPath + '] to 
repository : ' + str(details)
  -                            project.addError(message)
  -                            log.error(message)
  +                    # Publish them all (if redistributable)
  +                    if project.isRedistributable():
  +                        for jar in project.getJars():
  +                            # :TODO: Relative to module source?
  +                            jarPath=os.path.abspath(jar.getPath())
  +                            # Copy to repository
  +                            try:
  +                                repository.publish( project.getModule().getName(), 
jarPath )           
  +                            except Exception, details:
  +                                message='Failed to publish [' + jarPath + '] to 
repository : ' + str(details)
  +                                project.addError(message)
  +                                log.error(message)
                           
                       project.changeState(STATE_SUCCESS)
                       
  
  
  
  1.2       +8 -6      gump/commitCheck.py
  
  Index: commitCheck.py
  ===================================================================
  RCS file: /home/cvs/gump/commitCheck.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- commitCheck.py    12 Apr 2004 18:57:37 -0000      1.1
  +++ commitCheck.py    13 Apr 2004 15:59:25 -0000      1.2
  @@ -133,7 +133,7 @@
   lock.close()
   
   # Enable a log
  -logFile=os.path.abspath('gumpy__check_log.txt')
  +logFile=os.path.abspath('gumpy_check_log.txt')
   log=open(logFile,'w',0) # Unbuffered...
   
   result=0
  @@ -192,7 +192,6 @@
           for dirpath, dirs, files in 
os.walk(os.path.abspath(os.path.join(absGumpPython,'gump'))):
               possiblePackages.append(dirpath)
           
  -        
           # :TODO: Make dynamic (use os.walk or something)
           for p in possiblePackages:
               if not result:
  @@ -210,13 +209,15 @@
           if not result:
               # PyUnit            
               unitExit = runCommand('python 
gump/test/pyunit.py','*',str(absGumpPython))
  -            if unitExit:
  +            if unitExit: 
  +                log.write('***************** Unit Tests Failed ***************')
                   result=1
               
           if not result:
               # A test run...
               integrationExit = runCommand('gumpy')
  -            if integrationExit:
  +            if integrationExit:                 
  +                log.write('**************** Test Run Failed ***************')
                   result=1           
   
       except KeyboardInterrupt:    
  @@ -237,9 +238,10 @@
       # left around despite this finally.
       os.remove(lockFile)
       
  -    if 1 or result:
  +    if result:
           logTitle='The Apache Gump log...'
           catFile(sys.stdout, logFile, logTitle)
  +        print "Something failed..."
           
   # bye!
   sys.exit(result)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to