gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: gump/python/gump engine.py
Date Wed, 31 Mar 2004 17:41:42 GMT
ajack       2004/03/31 09:41:42

  Modified:    python/gump/model project.py propagation.py depend.py
               python/gump/document forrest.py
               template/forrest/src/documentation/content/xdocs site.xml
               python/gump/output xref.py
               python/gump engine.py
  Log:
  1) Make annotations less verbose.
  2) Show 'ids' for project jars
  3) Fixed 'type' on maven.properties file 
  4) Attempted to fix 'affected' to not count repeats
  
  Revision  Changes    Path
  1.70      +5 -11     gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- project.py	28 Mar 2004 18:58:05 -0000	1.69
  +++ project.py	31 Mar 2004 17:41:41 -0000	1.70
  @@ -272,17 +272,11 @@
           if self.affected: return self.affected
           
           # Look through all dependees
  -        for dependee in self.getFullDependees():
  -            project=dependee.getOwnerProject()
  -            
  +        for project in self.getFullDependeeProjectList():
               cause=project.getCause()
  -            #
               # Something caused this some grief
  -            #
               if cause:
  -                #
  -                # The something was this module or one of its projects
  -                #
  +                # The something was this project
                   if cause == self:
                       self.affected += 1            
           
  @@ -300,9 +294,9 @@
               dependeeProject=dependee.getOwnerProject()
           
               if dependee.isOptional():
  -                dependeeProject.addWarning("Optional dependency " + self.name + " " + message)
  +                dependeeProject.addInfo("Optional dependency " + self.name + " " + message)
               else:
  -                dependee.addError("Dependency " + self.name + " " + message)
  +                dependee.addInfo("Dependency " + self.name + " " + message)
                   dependeeProject.changeState(STATE_PREREQ_FAILED,reason,cause)
       #
       # We have a potential clash between the <project package attribute and
  @@ -410,7 +404,7 @@
               if 1 == self.getJarCount():
                   jar=self.getJarAt(0)
                   if not jar.hasId():
  -                    self.addInfo('Sole jar [' + jar.getPath() + '] identifier set to project
name')
  +                    self.addInfo('Sole jar [' + os.path.basename(jar.getPath()) + '] identifier
set to project name')
                       jar.setId(self.getName())    
               else:
                   #
  
  
  
  1.2       +1 -1      gump/python/gump/model/propagation.py
  
  Index: propagation.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/propagation.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- propagation.py	16 Mar 2004 19:50:15 -0000	1.1
  +++ propagation.py	31 Mar 2004 17:41:41 -0000	1.2
  @@ -58,7 +58,7 @@
                       message = lower(stateDescription(state))
                       if not REASON_UNSET == reason:
                           message += " with reason " + lower(reasonDescription(reason)) 
          
  -                self.addError(capitalize(message))
  +                self.addInfo(capitalize(message))
           
                   # Send on the changes...
                   self.propagateErrorStateChange(state,reason,cause,message)
  
  
  
  1.25      +11 -1     gump/python/gump/model/depend.py
  
  Index: depend.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/depend.py,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- depend.py	28 Mar 2004 21:09:26 -0000	1.24
  +++ depend.py	31 Mar 2004 17:41:41 -0000	1.25
  @@ -228,6 +228,9 @@
       def getDepends(self):
           return self.depends
           
  +    def getUniqueProjectDependList(self):
  +        return self.projectMap.keys()
  +        
       def getUniqueProjectDependCount(self):
           return len(self.projectMap)
       	
  @@ -300,6 +303,11 @@
       def getFullDependencyCount(self):
           self.getFullDependencies()
           return self.fullDependencies.getUniqueProjectDependCount()
  +        
  +    def getFullDependencyProjectList(self):
  +        self.getFullDependencies()
  +        return self.fullDependencies.getUniqueProjectDependList()        
  +        
   
       #
       # Depth
  @@ -356,7 +364,6 @@
       def getDirectDependees(self):
           return self.directDependees.getDepends()
           
  -        
       def getFullDependees(self):
           if self.fullDependees: return self.fullDependees.getDepends()
           
  @@ -386,6 +393,9 @@
           self.getFullDependees()
           return self.fullDependees.getUniqueProjectDependCount()
           
  +    def getFullDependeeProjectList(self):
  +        self.getFullDependees()
  +        return self.fullDependees.getUniqueProjectDependList()        
           
       def buildDependenciesMap(self,workspace):        
           
  
  
  
  1.122     +41 -5     gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
  retrieving revision 1.121
  retrieving revision 1.122
  diff -u -r1.121 -r1.122
  --- forrest.py	30 Mar 2004 19:19:34 -0000	1.121
  +++ forrest.py	31 Mar 2004 17:41:41 -0000	1.122
  @@ -2538,8 +2538,13 @@
           pxrefRow=pxrefTable.createRow()
           pxrefRow.createData().createLink(pByO, 'Projects By Output')
           pxrefRow.createData('The outputs for the project, e.g. jars.')
  -        
  -                
  +             
  +        # Projects By Output Ids
  +        pByOI=self.documentProjectsByOutputId(xref, run, workspace, gumpSet)          
     
  +        pxrefRow=pxrefTable.createRow()
  +        pxrefRow.createData().createLink(pByOI, 'Projects By Output Identifier')
  +        pxrefRow.createData('The identifiers for outputs for the project, e.g. jars.')
  +             
           # Projects By Descriptor Location
           pByDL=self.documentProjectsByDescriptorLocation(xref, run, workspace, gumpSet)
               
           pxrefRow=pxrefTable.createRow()
  @@ -2721,7 +2726,38 @@
               if hasSome:
                   outputRow=outputTable.createRow()
                   outputRow.createData(output)
  +                
  +                projectData=outputRow.createData()
  +                for project in projectList:        
  +                    if not gumpSet.inProjectSequence(project): continue               

  +                    self.insertLink(project, xref, projectData)
  +                    projectData.createText(' ')
  +          
  +        document.serialize()
  +        
  +        return fileName + '.html'
  +        
  +    def documentProjectsByOutputId(self,xref,run,workspace,gumpSet):
  +        fileName='output_id_project'
  +        file=self.resolver.getFile(xref,fileName)            
  +        document=XDocDocument('Projects By Output Identifiers',	file)
  +        
  +        outputTable=document.createTable(['Projects By Output Identifiers'])
  +        
  +        outputMap=xref.getOutputIdToProjectMap()
  +        for outputId in createOrderedList(outputMap.keys()):
  +                            
  +            projectList=createOrderedList(outputMap.get(outputId)) 
               
  +            hasSome=0
  +            for project in projectList:        
  +                if not gumpSet.inProjectSequence(project): continue
  +                hasSome=1
  +                
  +            if hasSome:
  +                outputRow=outputTable.createRow()
  +                outputRow.createData(outputId)
  +                
                   projectData=outputRow.createData()
                   for project in projectList:        
                       if not gumpSet.inProjectSequence(project): continue               

  
  
  
  1.26      +1 -0      gump/template/forrest/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/gump/template/forrest/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- site.xml	30 Mar 2004 18:49:40 -0000	1.25
  +++ site.xml	31 Mar 2004 17:41:41 -0000	1.26
  @@ -71,6 +71,7 @@
       <index label="by Package" href="gump_xref/package_project.html"/>
       <index label="by Description" href="gump_xref/description_project.html"/>
       <index label="by Output" href="gump_xref/output_project.html"/>
  +    <index label="by Output Id" href="gump_xref/output_id_project.html"/>
       <index label="by Descriptor" href="gump_xref/descriptor_project.html"/>    
     </stats>
   
  
  
  
  1.12      +15 -1     gump/python/gump/output/xref.py
  
  Index: xref.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/output/xref.py,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- xref.py	15 Mar 2004 22:07:07 -0000	1.11
  +++ xref.py	31 Mar 2004 17:41:41 -0000	1.12
  @@ -41,6 +41,7 @@
           self.descriptionToProject={}
           
           self.outputToProject={}
  +        self.outputIdToProject={}
           
           self.descriptorLocationToProject={}
           
  @@ -111,12 +112,22 @@
               for project in module.getProjects():                
                   if project.hasJars():
                       for jar in project.getJars():  
  -                        jarName=os.path.basename(jar.getName())            
  +                        jarName=os.path.basename(jar.getName())  
  +                        jarId=jar.getId() or 'No Identifier'
  +                        
  +                        # Create a list to hold multiple (if needed)          
                           if not self.outputToProject.has_key(jarName):
                               self.outputToProject[jarName]=[]
  +                        
  +                        # Create a list to hold multiple (if needed)          
  +                        if not self.outputIdToProject.has_key(jarId):
  +                            self.outputIdToProject[jarId]=[]
                       
  +                        # Store the Project
                           if not project in self.outputToProject[jarName]:
                               self.outputToProject[jarName].append(project)
  +                        if not project in self.outputIdToProject[jarId]:
  +                            self.outputIdToProject[jarId].append(project)
       
       def mapDescriptorLocations(self):
           for module in self.workspace.getModules():            
  @@ -149,6 +160,9 @@
           
       def getOutputToProjectMap(self):
           return self.outputToProject
  +        
  +    def getOutputIdToProjectMap(self):
  +        return self.outputIdToProject
           
       def getDescriptorLocationToProjectMap(self):
           return self.descriptorLocationToProject
  
  
  
  1.95      +8 -6      gump/python/gump/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/engine.py,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- engine.py	24 Mar 2004 15:19:22 -0000	1.94
  +++ engine.py	31 Mar 2004 17:41:41 -0000	1.95
  @@ -419,9 +419,10 @@
                               reason=REASON_BUILD_TIMEDOUT
                           project.changeState(STATE_FAILED,reason)
                           
  -                        # Display...
  -                        project.addInfo('Enable "debug" output, due to build failure.')
  -                        project.setDebug(1)
  +                        if not project.isDebug():
  +                            # Display...
  +                            project.addInfo('Enable "debug" output, due to build failure.')
  +                            project.setDebug(1)
                           
                       else:                         
                           # For now, things are going good...
  @@ -535,6 +536,7 @@
                   
                   try:
                       catFileToFileHolder(project,propertiesFile,	\
  +                        FILE_TYPE_CONFIG,	\
                           project.getName() + ' ' + os.path.basename(propertiesFile))
                   except:
                       log.error('Display Properties [ ' + propertiesFile + '] Failed', exc_info=1)
  
  @@ -650,10 +652,10 @@
           # Display report output, even if failed...
           #
           if project.hasReports() and wasBuilt:
  -            project.addInfo('Project produces reports')    
  +            #project.addInfo('Project produces reports')    
               for report in project.getReports():
                   reportDir=report.getResolvedPath() 
  -                project.addInfo('Reports in: ' + reportDir)
  +                project.addInfo('Project Reports in: ' + reportDir)
                   catDirectoryContentsToFileHolder(project,reportDir,FILE_TYPE_OUTPUT)
       
           # Maven generates a maven.log...
  @@ -663,7 +665,7 @@
                   project.addDebug('Maven Log in: ' + logFile)                
                   try:
                       catFileToFileHolder(project,logFile,	\
  -                        FILE_TYPE_LOG,
  +                        FILE_TYPE_LOG,	\
                           project.getName() + ' ' + os.path.basename(logFile))
                   except:
                       log.error('Display Log [ ' + logFile + '] Failed', exc_info=1)   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message