gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump/document forrest.py
Date Mon, 12 Jan 2004 18:01:36 GMT
ajack       2004/01/12 10:01:36

  Modified:    python/gump engine.py
               python/gump/model project.py
               python/gump/syndication atom.py
               python/gump/document forrest.py
  Log:
  1) Make missing output dirs an error, not a warning
  2) List output dirs only once
  3) Made atom specify mode='escaped', last issue with :
  http://www.feedvalidator.org/check?url=http://lsd.student.utwente.nl/gump/index.atom
  4) Made 'elapsed time' only show if some there
  5) Made forrest show 'depend(ee)s' and 'full depend(ee)s' to try to debug why numbers are
same.
  [Note: w/o these numbers being 'right' the 'affects' numbers are incorrect & hence worthless.]
  
  Revision  Changes    Path
  1.47      +9 -8      jakarta-gump/python/gump/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/engine.py,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- engine.py	9 Jan 2004 23:02:32 -0000	1.46
  +++ engine.py	12 Jan 2004 18:01:36 -0000	1.47
  @@ -505,14 +505,15 @@
                       for jar in project.getJars():
                           jarPath=os.path.abspath(jar.getPath())
                           dir=os.path.dirname(jarPath)
  -                        if not dir in dirs and os.path.exists(dir):
  -                            dircnt += 1
  -                            listDirectoryAsWork(project,dir,\
  -                                'list_'+project.getName()+'_dir'+str(dircnt)+'_'+os.path.basename(dir))
  -                            dirs.append(dir)
  -                            listed += 1
  -                        else:
  -                            project.addWarning("No such directory (where output is expect)
: " + dir)
  +                        if not dir in dirs:                        
  +                            dircnt += 1            
  +                            if os.path.exists(dir):
  +                                listDirectoryAsWork(project,dir,\
  +                                    'list_'+project.getName()+'_dir'+str(dircnt)+'_'+os.path.basename(dir))
  +                                dirs.append(dir)
  +                                listed += 1
  +                            else:
  +                                project.addError("No such directory (where output is expected)
: " + dir)
                               
                       if listed:
                           project.addError("See Directory Listing Work for Missing Outputs")
  
  
  
  1.27      +1 -1      jakarta-gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/project.py,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- project.py	9 Jan 2004 19:57:18 -0000	1.26
  +++ project.py	12 Jan 2004 18:01:36 -0000	1.27
  @@ -315,7 +315,7 @@
           # Return stored
           return self.totalDepends
                       
  -    def getFullDependenciesCount(self):         
  +    def getFullDependencyCount(self):         
           return len(self.getFullDependencies())                      
       
       def getFullDependees(self):   
  
  
  
  1.9       +4 -4      jakarta-gump/python/gump/syndication/atom.py
  
  Index: atom.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/syndication/atom.py,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- atom.py	11 Jan 2004 18:42:32 -0000	1.8
  +++ atom.py	12 Jan 2004 18:01:36 -0000	1.9
  @@ -112,7 +112,7 @@
                   modified, modified) )
   
           if self.content:
  -            stream.write("""<content type='text/html'>%s</content>"""	\
  +            stream.write("""<content type='text/html' mode='escaped'>%s</content>"""
\
               % (escape(self.content)) )
               
           # Write the trailer part...
  
  
  
  1.49      +31 -18    jakarta-gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- forrest.py	9 Jan 2004 23:02:32 -0000	1.48
  +++ forrest.py	12 Jan 2004 18:01:36 -0000	1.49
  @@ -306,8 +306,9 @@
                       
           detailsTable=detailsSection.createTable()
           detailsTable.createEntry("State : ", workspace.getStateDescription()) 
  -        
  -        detailsTable.createEntry("Elapsed Time : ", secsToElapsedString(workspace.getElapsedSecs()))
  +
  +        e = secsToElapsedString(workspace.getElapsedSecs())
  +        if e : detailsTable.createEntry("Elapsed Time : ", e)
           detailsTable.createEntry("Base Directory : ", workspace.getBaseDirectory())
           detailsTable.createEntry("Temporary Directory : ", workspace.tmpdir)
           #if workspace.scratchdir:
  @@ -929,7 +930,8 @@
           self.insertLink(project.getModule(),project,detailsList.createEntry('Module: '))
           if project.hasCause() and not project==project.getCause():
               self.insertTypedLink(project.getCause(),project,detailsList.createEntry('Root
Cause: '))
  -        detailsList.createEntry("Elapsed: ", secsToElapsedString(project.getElapsedSecs()))
  +        e = secsToElapsedString(project.getElapsedSecs())
  +        if e: detailsList.createEntry("Elapsed: ", e)
                                                         
           # Display nag information
           for nagEntry in project.xml.nag:
  @@ -966,12 +968,7 @@
           document=XDocDocument('Project Details : ' + project.getName(),	\
                       self.resolver.getFile(project, \
                                       project.getName() + '_details', \
  -                                        '.xml'))
  -            
  -        self.documentProjectList(detailsSection, "Project Dependencies",	\
  -                    project.getDependencies(), 0, project)  
  -        self.documentProjectList(detailsSection, "Project Dependees",		\
  -                    project.getDependees(), 1, project)
  +                                        '.xml'))     
    
       #    x.write('<p><strong>Project Config :</strong> <link href=\'%s\'>XML</link></p>'
\
       #                % (getModuleProjectRelativeUrl(modulename,project.name)) )       
             
  @@ -979,16 +976,30 @@
           miscSection=document.createSection('Miscellaneous')
               
           if project.hasBuildCommand():
  +            
               if project.hasAnt():                
                   self.documentProperties(miscSection, project.getAnt(), 'Ant Properties')
               
               (classpath,bootclasspath)=project.getClasspathLists()            
               self.displayClasspath(miscSection, classpath,'Classpath',project)        
               self.displayClasspath(miscSection, bootclasspath,'Boot Classpath',project)

  -               
  -           
  +       
           self.documentXML(miscSection,project)
           
  +        dependencySection=document.createSection('Dependency')
  +        
  +        self.documentProjectList(dependencySection, "Project Dependencies",	\
  +                    project.getDependencies(), 0, project)  
  +                    
  +        self.documentProjectList(dependencySection, "Project Dependees",		\
  +                    project.getDependees(), 1, project)
  +                    
  +        self.documentProjectList(dependencySection, "Full Project Dependencies",	\
  +                    project.getFullDependencies(), 0, project)  
  +                    
  +        self.documentProjectList(dependencySection, "Full Project Dependees",		\
  +                    project.getFullDependees(), 1, project)                          
  +        
           document.serialize()
           
           # Document the project XML
  @@ -1192,7 +1203,8 @@
                                   
               workList.createEntry("Start Time: ", secsToDate(work.result.start_time))
               workList.createEntry("End Time: ", secsToDate(work.result.end_time))
  -            workList.createEntry("Elapsed Time: ", secsToElapsedString(work.getElapsedSecs()))
  +            e = secsToElapsedString(work.getElapsedSecs())
  +            if e : workList.createEntry("Elapsed Time: ", e)
                      
               #
               # Show parameters
  @@ -1487,7 +1499,7 @@
           document=XDocDocument('Modules By Dependency Count',	\
               self.resolver.getFile(stats,'module_dependencies.xml'))
           
  -        dependenciesTable=document.createTable(['Modules By Dependency Count'])
  +        dependenciesTable=document.createTable(['Module','Full Dependency Count'])
           for module in stats.modulesByTotalDependencies:         
               if not gumpSet.inModules(module): continue   
               dependenciesRow=dependenciesTable.createRow()
  @@ -1507,7 +1519,7 @@
           document=XDocDocument('Modules By Dependee Count',
                       self.resolver.getFile(stats,'module_dependees.xml'))
           
  -        dependeesTable=document.createTable(['Modules By Dependee Count'])
  +        dependeesTable=document.createTable(['Module','Full Dependee Count'])
           for module in stats.modulesByTotalDependees:         
               if not gumpSet.inModules(module): continue   
               dependeesRow=dependeesTable.createRow()
  @@ -1551,12 +1563,13 @@
           document=XDocDocument('Projects By Dependency Count',	\
               self.resolver.getFile(stats,'project_dependencies.xml'))
           
  -        dependenciesTable=document.createTable(['Projects By Dependency Count'])
  +        dependenciesTable=document.createTable(['Project','Direct Dependency Count', 'Full
Dependency Count'])
           for project in stats.projectsByTotalDependencies:         
               if not gumpSet.inSequence(project): continue   
               dependenciesRow=dependenciesTable.createRow()
               self.insertLink( project, stats, dependenciesRow.createData())
               dependenciesRow.createData( project.getDependencyCount())
  +            dependenciesRow.createData( project.getFullDependencyCount())
               
               #projectsString=''
               #for project in module.getDepends():
  
  
  

Mime
View raw message