ajack       2004/03/08 14:28:09

  Modified:    python/gump/test gumpset_tests.py
               python/gump check.py update.py gumprun.py engine.py build.py
                        continuous.py integrate.py
               python/gump/document forrest.py text.py
               python/gump/results resulter.py
               python/gump/storage gen.py
               python/gump/utils http.py commandLine.py
               python/gump/output nag.py
               python/gump/gui view.py
               python/gump/model loader.py
               python/storage/results resulter.py
  Log:
  1) Make GumpSet have modules/moduleSequence to match projects/projectSequence,

  not just modules.

  

  2) Reworked command line (a hack) to allow it to set GumpRunOptions

  

  3) Try making the commandline scripts a little more friendly to adhoc usage
  
  Revision  Changes    Path
  1.5       +4 -4      gump/python/gump/test/gumpset_tests.py
  
  Index: gumpset_tests.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/test/gumpset_tests.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- gumpset_tests.py  17 Feb 2004 21:54:21 -0000      1.4
  +++ gumpset_tests.py  8 Mar 2004 22:28:08 -0000       1.5
  @@ -87,7 +87,7 @@
      for p in projects:
          print " Project : " + p.getName()
          
  -   sequence=gumpSet.getSequence()   
  +   sequence=gumpSet.getProjectSequence()   
      print "Project Sequence:" + str(len(sequence))
      for p in sequence:
          print " Sequence: " + p.getName()
  
  
  
  1.38      +5 -9      gump/python/gump/check.py
  
  Index: check.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/check.py,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- check.py  2 Mar 2004 21:11:39 -0000       1.37
  +++ check.py  8 Mar 2004 22:28:08 -0000       1.38
  @@ -92,16 +92,12 @@
   if __name__=='__main__':
   
       # Process command line
  -    args = handleArgv(sys.argv)
  +    (args,options) = handleArgv(sys.argv)
       ws=args[0]
       ps=args[1]
       
       # get parsed workspace definition
  -    workspace=WorkspaceLoader().load(ws)
  -      
  -    
  -    # TODO populate...
  -    options=GumpRunOptions()
  +    workspace=WorkspaceLoader().load(ws, options.isQuick())
       
       # The Run Details...
       run=GumpRun(workspace,ps,options)
  
  
  
  1.23      +2 -5      gump/python/gump/update.py
  
  Index: update.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/update.py,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- update.py 24 Nov 2003 18:32:19 -0000      1.22
  +++ update.py 8 Mar 2004 22:28:08 -0000       1.23
  @@ -37,12 +37,12 @@
   if __name__=='__main__':
   
       # Process command line
  -    args = handleArgv(sys.argv)
  +    (args,options) = handleArgv(sys.argv)
       ws=args[0]
       ps=args[1]
       
       # get parsed workspace definition
  -    workspace=WorkspaceLoader().load(ws)
  +    workspace=WorkspaceLoader().load(ws, options.isQuick())
         
       #
       # Check Environment (eventually not do this each time)
  @@ -56,9 +56,6 @@
       # to screen.
       #
       #check(workspace, ps, context, 0)    
  -    
  -    # TODO populate...
  -    options=GumpRunOptions()
       
       # The Run Details...
       run=GumpRun(workspace,ps,options)
  
  
  
  1.10      +46 -11    gump/python/gump/gumprun.py
  
  Index: gumprun.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/gumprun.py,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- gumprun.py        3 Mar 2004 00:49:52 -0000       1.9
  +++ gumprun.py        8 Mar 2004 22:28:08 -0000       1.10
  @@ -46,8 +46,9 @@
       """ Contains the primary works sets -- to save recalculating and
       passing so many individual things around """
       def __init__(self, workspace, pexpr=None, \
  -                        projects=None, sequence=None, \
  -                        modules=None, repositories=None ):
  +                        projects=None, projectSequence=None, \
  +                        modules=None, moduleSequence=None, \
  +                        repositories=None ):
           self.workspace=workspace
           if not self.workspace:
               raise RuntimeError, 'A non-None workspace is require'
  @@ -67,24 +68,32 @@
           #
           # Project Build Sequence
           #
  -        if not sequence:
  -            self.sequence=self.getBuildSequenceForProjects(self.projects)
  +        if not projectSequence:
  +            self.projectSequence=self.getBuildSequenceForProjects(self.projects)
           else:
  -            self.sequence=sequence
  +            self.projectSequence=projectSequence
               
           #
           # Module List
           #
           if not modules:
  -            self.modules=self.getModulesForProjectList(self.sequence)
  +            self.modules=self.getModulesForProjectList(self.projects)
           else:
               self.modules=modules 
           
           #
  +        # Module Sequence
  +        #
  +        if not moduleSequence:
  +            self.moduleSequence=self.getModulesForProjectList(self.projectSequence)
  +        else:
  +            self.moduleSequence=moduleSequence
  +        
  +        #
           # Repository List
           #
           if not repositories:
  -            self.repositories=self.getRepositoriesForModuleList(self.modules)
  +            self.repositories=self.getRepositoriesForModuleList(self.moduleSequence)
           else:
               self.repositories=repositories
                   
  @@ -121,7 +130,14 @@
       def inModules(self,module):
           return module in self.modules
           
  +    def getModuleSequence(self):
  +        return self.moduleSequence
  +            
  +    def inModuleSequence(self,module):
  +        return module in self.moduleSequence
  +        
       def getRepositories(self):
  +        """ The list of repositories encountered by the module sequence """
           return self.repositories
               
       def inRepositories(self,repository):
  @@ -136,11 +152,11 @@
       def getProjectExpression(self):
           return self.projectexpression
           
  -    def getSequence(self):
  -        return self.sequence    
  +    def getProjectSequence(self):
  +        return self.projectSequence    
   
  -    def inSequence(self,project):
  -        return project in self.sequence
  +    def inProjectSequence(self,project):
  +        return project in self.projectSequence
       
       def getModuleNamesForProjectExpression(self,expr):
           return self.getModuleNamesForProjectList(    \
  @@ -295,6 +311,7 @@
    
           self.debug=0 
           self.verbose=0       
  +        self.quick=1 # Defaults to QUICK
           self.dated=0 # Defaults to NOT dated.
           
           # Default is Text        
  @@ -316,6 +333,24 @@
           
       def setDated(self,dated):
           self.dated=dated
  +        
  +    def isQuick(self):
  +        return self.quick
  +        
  +    def setQuick(self,quick):
  +        self.quick=quick
  +        
  +    def isDebug(self):
  +        return self.debug
  +        
  +    def setDebug(self,debug):
  +        self.debug=debug
  +        
  +    def isVerbose(self):
  +        return self.verbose
  +        
  +    def setVerbose(self,verbose):
  +        self.verbose=verbose
           
   class GumpRun(Workable,Annotatable,Stateful):
       def __init__(self,workspace,expr=None,options=None):
  
  
  
  1.76      +22 -6     gump/python/gump/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/engine.py,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- engine.py 8 Mar 2004 00:27:50 -0000       1.75
  +++ engine.py 8 Mar 2004 22:28:08 -0000       1.76
  @@ -261,10 +261,27 @@
           #
           # Checkout from source code repositories
           #
  -        self.syncWorkDirs(run)
  +        self.syncWorkDirs(run)  
  +  
  +        # Return an exit code based off success
  +        # :TODO: Move onto run
  +        if run.getWorkspace().isSuccess():
  +            result = SUCCESS 
  +        else: 
  +            result = FAILED
  +        
  +        return result
     
       def updateModules(self, run):
  - 
  +        return self.performUpdateModules( run, \
  +                                run.getGumpSet().getModules())
  +        
  +    def updateModulesAll(self, run):    
  +        return self.performUpdateModules( run, \
  +                                run.getGumpSet().getModuleSequence())
  +
  +    def performUpdateModules(self, run, list):    
  +    
           workspace = run.getWorkspace()
           
           # :TODO: A tad bogus to move here
  @@ -278,7 +295,6 @@
   
           #log.debug('Modules to update:') 
       
  -        list=run.getGumpSet().getModules()
           moduleCount=len(list)
           moduleNo=1     
           # Update all the modules that have CVS repositories
  @@ -347,7 +363,7 @@
   
           log.debug('--- Synchronizing work directories with sources')  
   
  -        for module in run.getGumpSet().getModules():
  +        for module in run.getGumpSet().getModuleSequence():
       
               # If no CVS/SVN, nothing to sync   
               if not module.hasCvs() \
  @@ -389,7 +405,7 @@
       
       def buildAll(self,run):
           """ Build a GumpRun's Full Project Stack """
  -        sequence=run.getGumpSet().getSequence()
  +        sequence=run.getGumpSet().getProjectSequence()
   
           return self.buildProjectList(run,sequence)
     
  @@ -837,7 +853,7 @@
           
       def checkModules(self,run):
           # Check all the modules
  -        list=run.getGumpSet().getModules()
  +        list=run.getGumpSet().getModuleSequence()
           moduleCount=len(list)
           moduleNo=1
           for module in list:      
  
  
  
  1.41      +2 -5      gump/python/gump/build.py
  
  Index: build.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/build.py,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- build.py  19 Dec 2003 00:23:02 -0000      1.40
  +++ build.py  8 Mar 2004 22:28:08 -0000       1.41
  @@ -37,12 +37,12 @@
   if __name__=='__main__':
   
       # Process command line
  -    args = handleArgv(sys.argv)
  +    (args,options) = handleArgv(sys.argv)
       ws=args[0]
       ps=args[1]
   
       # get parsed workspace definition
  -    workspace=WorkspaceLoader().load(ws)
  +    workspace=WorkspaceLoader().load(ws, options.isQuick())
         
       #
       # Check Environment (eventually not do this each time)
  @@ -56,9 +56,6 @@
       # to screen.
       #
       #check(workspace, ps, context, 0)    
  -    
  -    # TODO populate...
  -    options=GumpRunOptions()
       
       # The Run Details...
       run=GumpRun(workspace,ps,options)
  
  
  
  1.3       +2 -6      gump/python/gump/continuous.py
  
  Index: continuous.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/continuous.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- continuous.py     9 Jan 2004 19:57:19 -0000       1.2
  +++ continuous.py     8 Mar 2004 22:28:08 -0000       1.3
  @@ -37,17 +37,13 @@
   if __name__=='__main__':
   
       # Process command line
  -    args = handleArgv(sys.argv)
  +    (args,options) = handleArgv(sys.argv)
       ws=args[0]
       ps=args[1]
       
       # get parsed workspace definition
  -    workspace=WorkspaceLoader().load(ws)
  -      
  +    workspace=WorkspaceLoader().load(ws, options.isQuick())
       
  -    # TODO populate...
  -    options=GumpRunOptions()
  -  
       #
       # Dated means add the date to the log dir...
       #
  
  
  
  1.21      +9 -16     gump/python/gump/integrate.py
  
  Index: integrate.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/integrate.py,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- integrate.py      23 Feb 2004 21:55:35 -0000      1.20
  +++ integrate.py      8 Mar 2004 22:28:08 -0000       1.21
  @@ -99,26 +99,19 @@
   if __name__=='__main__':
   
       # Process command line
  -    args = handleArgv(sys.argv)
  +    (args,options) = handleArgv(sys.argv)
       ws=args[0]
       ps=args[1]    
                   
       logResourceUtilization('Before load workspace')
           
       # get parsed workspace definition
  -    workspace=WorkspaceLoader().load(ws)
  -      
  -    
  -    # TODO populate...
  -    options=GumpRunOptions()
  -  
  -    #
  -    # Dated means add the date to the log dir...
  -    #
  -    if '-d' in args or '--dated' in args:
  -        options.setDated(1)    
  -    
  +    workspace=WorkspaceLoader().load(ws, 0)
  +
       logResourceUtilization('Before create run')
  +    
  +    # Has to be absolute latest descriptors, not cached...
  +    options.setQuick(0)
       
       # The Run Details...
       run=GumpRun(workspace,ps,options)
  
  
  
  1.96      +42 -42    gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- forrest.py        8 Mar 2004 16:04:08 -0000       1.95
  +++ forrest.py        8 Mar 2004 22:28:08 -0000       1.96
  @@ -236,8 +236,8 @@
       def documentWorkspace(self,run,workspace,gumpSet):
           
           # Pretty sorting...
  -        sortedModuleList=createOrderedList(gumpSet.getModules())
  -        sortedProjectList=createOrderedList(gumpSet.getSequence())
  +        sortedModuleList=createOrderedList(gumpSet.getModuleSequence())
  +        sortedProjectList=createOrderedList(gumpSet.getProjectSequence())
           sortedRepositoryList=createOrderedList(gumpSet.getRepositories())        
           sortedServerList=createOrderedList(workspace.getServers())       
           sortedTrackerList=createOrderedList(workspace.getTrackers())
  @@ -438,9 +438,9 @@
           projectsSection=document.createSection('Projects (in build order)')
           projectsTable=projectsSection.createTable(['Time','Updated','Name','Project 
State','Duration\nin state','Last Modified','Elapsed'])
           pcount=0
  -        for project in gumpSet.getSequence():
  +        for project in gumpSet.getProjectSequence():
               # :TODO: Next line irrelevent?
  -            if not gumpSet.inSequence(project): continue       
  +            if not gumpSet.inProjectSequence(project): continue       
               
               pcount+=1
       
  @@ -476,7 +476,7 @@
           projectsTable=projectsSection.createTable(['Name','Project State','Elapsed 
Time','FOG Factor'])
           pcount=0
           for project in sortedProjectList:
  -            if not gumpSet.inSequence(project): continue    
  +            if not gumpSet.inProjectSequence(project): continue    
               
               pcount+=1
       
  @@ -508,7 +508,7 @@
                       'Duration\nin state','Project State'])
           pcount=0
           for project in sortedProjectList:
  -            if not gumpSet.inSequence(project): continue       
  +            if not gumpSet.inProjectSequence(project): continue       
               
               if not project.getState()==STATE_FAILED:
                   continue
  @@ -562,7 +562,7 @@
           
           mcount=0
           for module in sortedModuleList:      
  -            if not gumpSet.inModules(module): continue
  +            if not gumpSet.inModuleSequence(module): continue
               
               #
               # Determine if there are todos, otherwise continue
  @@ -623,7 +623,7 @@
   
           mcount=0
           for module in sortedModuleList:
  -            if not gumpSet.inModules(module): continue
  +            if not gumpSet.inModuleSequence(module): continue
               
               mcount+=1
                       
  @@ -653,7 +653,7 @@
           mpkgTable=mpkgSection.createTable(['Name','State','Project State(s)'])
           mcount=0
           for module in sortedModuleList:           
  -            if not gumpSet.inModules(module): continue
  +            if not gumpSet.inModuleSequence(module): continue
               
               packaged=0
               #
  @@ -680,7 +680,7 @@
           if packages:
               pkgsTable=pkgsSection.createTable(['Name','State','Location'])
               for project in sortedProjectList:
  -                if not gumpSet.inSequence(project): continue   
  +                if not gumpSet.inProjectSequence(project): continue   
                   if not project.isPackaged(): continue
                   
                   packageRow=pkgsTable.createRow()                
  @@ -718,7 +718,7 @@
           # Document modules
           #
           for module in workspace.getModules():
  -            if not gumpSet.inModules(module): continue  
  +            if not gumpSet.inModuleSequence(module): continue  
               self.documentModule(module,workspace,gumpSet)
               
           # Document workspace
  @@ -959,7 +959,7 @@
               ptodosTable=ptodosSection.createTable(['Name','State','Elapsed'])
               pcount=0
               for project in module.getProjects():     
  -                if not gumpSet.inSequence(project): continue  
  +                if not gumpSet.inProjectSequence(project): continue  
               
                   #
                    # Determine if there are todos, otherwise continue
  @@ -986,7 +986,7 @@
           
           pcount=0
           for project in module.getProjects():     
  -            if not gumpSet.inSequence(project): continue  
  +            if not gumpSet.inProjectSequence(project): continue  
               pcount+=1
               
               projectRow=pallTable.createRow()
  @@ -1062,7 +1062,7 @@
         
           # Document Projects
           for project in module.getProjects():
  -            if not gumpSet.inSequence(project): continue      
  +            if not gumpSet.inProjectSequence(project): continue      
               self.documentProject(project,workspace,gumpSet)
          
       # Document the module XML
  @@ -1789,7 +1789,7 @@
       def insertStateIcons(self,gumpSet,module,fromObject,xdocNode):
           icons=''
           for project in module.getProjects():
  -            if not gumpSet.inSequence(project): continue     
  +            if not gumpSet.inProjectSequence(project): continue     
               self.insertStateIcon(project,fromObject,xdocNode)
               # A separator, to allow line wrapping
               xdocNode.createText(' ')
  @@ -1989,7 +1989,7 @@
           
           elapsedTable=document.createTable(['Modules By Elapsed'])
           for module in stats.modulesByElapsed:        
  -            if not gumpSet.inModules(module): continue
  +            if not gumpSet.inModuleSequence(module): continue
               elapsedRow=elapsedTable.createRow()
               self.insertLink( module, stats, elapsedRow.createData())
               elapsedRow.createData(secsToElapsedString(module.getElapsedSecs()))
  @@ -2005,7 +2005,7 @@
           
           mprojsTable=document.createTable(['Modules By Project Count'])
           for module in stats.modulesByProjectCount:         
  -            if not gumpSet.inModules(module): continue     
  +            if not gumpSet.inModuleSequence(module): continue     
               mprojsRow=mprojsTable.createRow()
               
               self.insertLink( module, stats, mprojsRow.createData())
  @@ -2031,7 +2031,7 @@
           
           dependenciesTable=document.createTable(['Module','Full Dependency Count'])
           for module in stats.modulesByTotalDependencies:         
  -            if not gumpSet.inModules(module): continue   
  +            if not gumpSet.inModuleSequence(module): continue   
               dependenciesRow=dependenciesTable.createRow()
               self.insertLink( module, stats, dependenciesRow.createData())
               dependenciesRow.createData( module.getFullDependencyCount())
  @@ -2054,7 +2054,7 @@
           
           dependeesTable=document.createTable(['Module','Full Dependee Count'])
           for module in stats.modulesByTotalDependees:         
  -            if not gumpSet.inModules(module): continue   
  +            if not gumpSet.inModuleSequence(module): continue   
               dependeesRow=dependeesTable.createRow()
               self.insertLink( module, stats, dependeesRow.createData())
               dependeesRow.createData(module.getFullDependeeCount())
  @@ -2075,7 +2075,7 @@
           document=XDocDocument('Modules By FOG Factor',       file)        
           fogTable=document.createTable(['Module','FOG Factor'])
           for module in stats.modulesByFOGFactor:        
  -            if not gumpSet.inModules(module): continue    
  +            if not gumpSet.inModuleSequence(module): continue    
               fogRow=fogTable.createRow()            
               self.insertLink( module, stats, fogRow.createData())                
               fogRow.createData('%02.2f' % module.getFOGFactor())
  @@ -2090,7 +2090,7 @@
           document=XDocDocument('Modules By Last Updated', file)        
           updTable=document.createTable(['Module','Last Updated'])
           for module in stats.modulesByLastUpdated:        
  -            if not gumpSet.inModules(module): continue    
  +            if not gumpSet.inModuleSequence(module): continue    
               updRow=updTable.createRow()            
               self.insertLink( module, stats, updRow.createData())                
               updRow.createData(secsToDate(module.getLastUpdated()))
  @@ -2106,7 +2106,7 @@
           
           elapsedTable=document.createTable(['Projects By Elapsed'])
           for project in stats.projectsByElapsed:        
  -            if not gumpSet.inSequence(project): continue
  +            if not gumpSet.inProjectSequence(project): continue
               elapsedRow=elapsedTable.createRow()
               self.insertLink( project, stats, elapsedRow.createData())
               elapsedRow.createData(secsToElapsedString(project.getElapsedSecs()))
  @@ -2122,7 +2122,7 @@
           
           dependenciesTable=document.createTable(['Project','Direct Dependency 
Count', 'Full Dependency Count'])
           for project in stats.projectsByTotalDependencies:         
  -            if not gumpSet.inSequence(project): continue   
  +            if not gumpSet.inProjectSequence(project): continue   
               dependenciesRow=dependenciesTable.createRow()
               self.insertLink( project, stats, dependenciesRow.createData())
               dependenciesRow.createData( project.getDependencyCount())
  @@ -2146,7 +2146,7 @@
           
           dependeesTable=document.createTable(['Project','Direct Dependee Count', 
'Full Dependee Count'])
           for project in stats.projectsByTotalDependees:         
  -            if not gumpSet.inSequence(project): continue   
  +            if not gumpSet.inProjectSequence(project): continue   
               dependeesRow=dependeesTable.createRow()
               self.insertLink( project, stats, dependeesRow.createData())
               dependeesRow.createData(project.getDependeeCount())
  @@ -2168,7 +2168,7 @@
           document=XDocDocument('Projects By FOG Factor',       file)        
           
fogTable=document.createTable(['Project','Successes','Failures','Preq-Failures','FOG 
Factor'])
           for project in stats.projectsByFOGFactor:        
  -            if not gumpSet.inSequence(project): continue    
  +            if not gumpSet.inProjectSequence(project): continue    
               fogRow=fogTable.createRow()            
               self.insertLink( project, stats, fogRow.createData())  
                    
  @@ -2189,7 +2189,7 @@
           document=XDocDocument('Projects By Duration In State',       file)        
           durTable=document.createTable(['Project','Duration\nIn State','State'])
           for project in stats.projectsBySequenceInState:        
  -            if not gumpSet.inSequence(project): continue    
  +            if not gumpSet.inProjectSequence(project): continue    
               durRow=durTable.createRow()            
               self.insertLink( project, stats, durRow.createData())  
                    
  @@ -2289,7 +2289,7 @@
           
                   moduleRepoTable=repoSection.createTable(['Modules'])
                   for module in moduleList:        
  -                    if not gumpSet.inModules(module): continue
  +                    if not gumpSet.inModuleSequence(module): continue
                       moduleRepoRow=moduleRepoTable.createRow()
                       self.insertLink( module, xref, moduleRepoRow.createData())
                       
  @@ -2314,7 +2314,7 @@
               
               hasSome=0
               for module in moduleList:        
  -                if not gumpSet.inModules(module): continue
  +                if not gumpSet.inModuleSequence(module): continue
                   hasSome=1
                   
               if hasSome:
  @@ -2323,7 +2323,7 @@
               
                   moduleData=packageRow.createData()
                   for module in moduleList:        
  -                    if not gumpSet.inModules(module): continue                
  +                    if not gumpSet.inModuleSequence(module): continue               
 
                       self.insertLink(module, xref, moduleData)
                       moduleData.createText(' ')
             
  @@ -2346,7 +2346,7 @@
               
               hasSome=0
               for module in moduleList:        
  -                if not gumpSet.inModules(module): continue
  +                if not gumpSet.inModuleSequence(module): continue
                   hasSome=1
                   
               if hasSome:
  @@ -2355,7 +2355,7 @@
               
                   moduleData=descriptionRow.createData()
                   for module in moduleList:        
  -                    if not gumpSet.inModules(module): continue                
  +                    if not gumpSet.inModuleSequence(module): continue               
 
                       self.insertLink(module, xref, moduleData)
                       moduleData.createText(' ')
             
  @@ -2377,7 +2377,7 @@
               
               hasSome=0
               for project in projectList:        
  -                if not gumpSet.inSequence(project): continue
  +                if not gumpSet.inProjectSequence(project): continue
                   hasSome=1
                   
               if hasSome:
  @@ -2386,7 +2386,7 @@
               
                   projectData=packageRow.createData()
                   for project in projectList:        
  -                    if not gumpSet.inSequence(project): continue                
  +                    if not gumpSet.inProjectSequence(project): continue             
   
                       self.insertLink(project, xref, projectData)
                       projectData.createText(' ')
             
  @@ -2408,7 +2408,7 @@
               
               hasSome=0
               for project in projectList:        
  -                if not gumpSet.inSequence(project): continue
  +                if not gumpSet.inProjectSequence(project): continue
                   hasSome=1
                   
               if hasSome:
  @@ -2417,7 +2417,7 @@
               
                   projectData=descriptionRow.createData()
                   for project in projectList:        
  -                    if not gumpSet.inSequence(project): continue                
  +                    if not gumpSet.inProjectSequence(project): continue             
   
                       self.insertLink(project, xref, projectData)
                       projectData.createText(' ')
             
  @@ -2440,7 +2440,7 @@
               
               hasSome=0
               for project in projectList:        
  -                if not gumpSet.inSequence(project): continue
  +                if not gumpSet.inProjectSequence(project): continue
                   hasSome=1
                   
               if hasSome:
  @@ -2449,7 +2449,7 @@
               
                   projectData=outputRow.createData()
                   for project in projectList:        
  -                    if not gumpSet.inSequence(project): continue                
  +                    if not gumpSet.inProjectSequence(project): continue             
   
                       self.insertLink(project, xref, projectData)
                       projectData.createText(' ')
             
  @@ -2471,7 +2471,7 @@
               
               hasSome=0
               for project in projectList:        
  -                if not gumpSet.inSequence(project): continue
  +                if not gumpSet.inProjectSequence(project): continue
                   hasSome=1
                   
               if hasSome:
  @@ -2480,7 +2480,7 @@
               
                   projectData=descLocnRow.createData()
                   for project in projectList:        
  -                    if not gumpSet.inSequence(project): continue                
  +                    if not gumpSet.inProjectSequence(project): continue             
   
                       self.insertLink(project, xref, projectData)
                       projectData.createText(' ')
             
  
  
  
  1.10      +7 -7      gump/python/gump/document/text.py
  
  Index: text.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/text.py,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- text.py   17 Feb 2004 21:54:21 -0000      1.9
  +++ text.py   8 Mar 2004 22:28:09 -0000       1.10
  @@ -98,8 +98,8 @@
               
               
           # Pretty sorting...
  -        sortedModuleList=createOrderedList(gumpSet.getModules())
  -        sortedProjectList=createOrderedList(gumpSet.getSequence())
  +        sortedModuleList=createOrderedList(gumpSet.getModuleSequence())
  +        sortedProjectList=createOrderedList(gumpSet.getProjectSequence())
           sortedRepositoryList=createOrderedList(gumpSet.getRepositories())        
           sortedServerList=createOrderedList(workspace.getServers())     
           sortedTrackerList=createOrderedList(workspace.getTrackers())
  @@ -113,14 +113,14 @@
           
           indent += ' '
           for module in sortedModuleList:
  -            if not gumpSet.inModules(module): continue       
  +            if not gumpSet.inModuleSequence(module): continue       
               output.write(indent + "Module [" + module.getName() + "] State: " + 
module.getStateDescription() + "\n")
               output.write(indent + "Projects: " + str(len(module.getProjects())) + 
"\n")
   
               self.documentAnnotations(indent,module)
                       
               for project in module.getProjects():
  -                if not gumpSet.inSequence(project): continue
  +                if not gumpSet.inProjectSequence(project): continue
               
                   self.documentProject(indent,project)
                   
  
  
  
  1.15      +4 -4      gump/python/gump/results/resulter.py
  
  Index: resulter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/results/resulter.py,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- resulter.py       8 Mar 2004 05:40:49 -0000       1.14
  +++ resulter.py       8 Mar 2004 22:28:09 -0000       1.15
  @@ -158,7 +158,7 @@
         

           # For all modules...

           for module in self.workspace.getModules():        

  -                if not self.gumpSet.inModules(module): continue

  +                if not self.gumpSet.inModuleSequence(module): continue

                   

                   #

                   # Gather results for this module

  @@ -169,7 +169,7 @@
                   

                   # Add projects

                   for project in module.getProjects():

  -                    if not self.gumpSet.inSequence(project): continue    

  +                    if not self.gumpSet.inProjectSequence(project): continue    

                       

                       #

                       # Gather results for this project

  @@ -200,7 +200,7 @@
       

           # For all modules...

           for module in self.workspace.getModules():        

  -                if not self.gumpSet.inModules(module): continue

  +                if not self.gumpSet.inModuleSequence(module): continue

                   

                   #

                   # Generate results for this module, and

  @@ -216,7 +216,7 @@
                   

                   # Add projects

                   for project in module.getProjects():

  -                    if not self.gumpSet.inSequence(project): continue    

  +                    if not self.gumpSet.inProjectSequence(project): continue    

                       

                       #

                       # Add a project

  
  
  
  1.3       +4 -4      gump/python/gump/storage/gen.py
  
  Index: gen.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/storage/gen.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- gen.py    9 Jan 2004 19:57:20 -0000       1.2
  +++ gen.py    8 Mar 2004 22:28:09 -0000       1.3
  @@ -138,7 +138,7 @@
     log.setLevel(default.logLevel)
   
     # load commandline args or use default values
  -  args = handleArgv(sys.argv,0)
  +  (args,options) = handleArgv(sys.argv,0)
     ws=args[0]
   
     workspace=load(ws)
  
  
  
  1.5       +5 -5      gump/python/gump/utils/http.py
  
  Index: http.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/http.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- http.py   23 Feb 2004 23:11:22 -0000      1.4
  +++ http.py   8 Mar 2004 22:28:09 -0000       1.5
  @@ -113,7 +113,7 @@
   ###############################################################################
   
     
  -def cacheHTTP(href,cacheDir=dir.cache):
  +def cacheHTTP(href,cacheDir=dir.cache,optimize=0):
       """returns the path of the file in the href, cached if remote"""
   
       #if it's a local file get it locally
  @@ -128,7 +128,7 @@
   
       #download the file if not present in the cache
       usecached=0
  -    if switch.optimize and switch.optimizenetwork:
  +    if optimize or (switch.optimize and switch.optimizenetwork):
           if os.path.exists(cachedHrefFile):
             log.info('Using cached descriptor for ' + href)
             usecached=1
  
  
  
  1.9       +30 -8     gump/python/gump/utils/commandLine.py
  
  Index: commandLine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/commandLine.py,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- commandLine.py    29 Feb 2004 19:16:20 -0000      1.8
  +++ commandLine.py    8 Mar 2004 22:28:09 -0000       1.9
  @@ -73,6 +73,7 @@
   from gump.config import default
   from gump.utils import banner
   
  +
   #
   # Process the command line, returning:
   #
  @@ -82,7 +83,11 @@
   #
   class CommandLine:
       def __init__(self,argv,requireProject=1):
  -        self.args = []  
  +        self.args = []
  +        
  +        # For storing options
  +        from gump.gumprun import GumpRunOptions  
  +        self.options=GumpRunOptions()
           
           # Extract the workspace
           if len(argv)==2: 
  @@ -117,12 +122,26 @@
               if arg in ['-d','--debug']:
                   argv.remove(arg) 
                   log.info('Setting log level to DEBUG')
  -                log.setLevel(logging.DEBUG ) 
  +                self.options.setDebug(1)
  +                log.setLevel(logging.DEBUG) 
               elif arg in ['-v','--verbose']: 
                   argv.remove(arg) 
                   log.info('Setting log level to VERBOSE')
  -                # :TODO:
  -                log.setLevel(logging.DEBUG )  
  +                self.options.setVerbose(1)
  +                # :TODO: VERBOSE doesn't exist within logging...
  +                log.setLevel(logging.DEBUG)  
  +            elif arg in ['-l','--latest']:
  +                argv.remove(arg)
  +                self.options.setQuick(0)
  +                log.info('Absolute Latest [no use of cache, non-stack]')
  +            elif arg in ['-D','--dated']:
  +                argv.remove(arg)    
  +                #
  +                # Dated means add the date to the log dir...
  +                #
  +                options.setDated(1)                    
  +                log.info('Dated Operation (add date to log dir)')
  +
   
           if len(argv)>2 and argv[1] in ['-w','--workspace']:
               self.args.append(argv[2])
  @@ -155,8 +174,11 @@
   
       def getArguments(self):
           return self.args
  +        
  +    def getOptions(self):
  +        return self.options
   
   def handleArgv(argv, requireProject=1):
       cl=CommandLine(argv,requireProject)
  -    return cl.getArguments()
  +    return (cl.getArguments(), cl.getOptions())
       
  
  
  
  1.25      +5 -5      gump/python/gump/output/nag.py
  
  Index: nag.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/output/nag.py,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- nag.py    4 Mar 2004 17:54:18 -0000       1.24
  +++ nag.py    8 Mar 2004 22:28:09 -0000       1.25
  @@ -131,7 +131,7 @@
       
           # For all modules...
           for module in self.workspace.getModules():        
  -                if not self.gumpSet.inModules(module): continue
  +                if not self.gumpSet.inModuleSequence(module): continue
   
                   if module.isFailed():
                       try:
  @@ -144,7 +144,7 @@
                   else:
                       for project in module.getProjects():
                           if project.isFailed() :
  -                            if not self.gumpSet.inSequence(project): continue       
                 
  +                            if not self.gumpSet.inProjectSequence(project): 
continue                        
                           
                               try:                        
                                   log.info('Nag for project: ' + project.getName())   
                                                     
  
  
  
  1.5       +2 -2      gump/python/gump/gui/view.py
  
  Index: view.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/gui/view.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- view.py   15 Dec 2003 19:36:52 -0000      1.4
  +++ view.py   8 Mar 2004 22:28:09 -0000       1.5
  @@ -379,7 +379,7 @@
   

       # gather a list of project dependencies unrolled to build

       run=GumpSet(self.workspace,project.getName())

  -    self.build_sequence = run.getSequence()

  +    self.build_sequence = run.getProjectSequence()

       

       # display the project dependencies

       self.dependencies.DeleteAllItems()

  @@ -689,7 +689,7 @@
     logger.addHandler(lh)

   

     # loadspecified or default workspace

  -  args = handleArgv(sys.argv,0)

  +  (args,options) = handleArgv(sys.argv,0)

     app.load([args[0]])

   

     # start app

  
  
  
  1.8       +64 -46    gump/python/gump/model/loader.py
  
  Index: loader.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/loader.py,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- loader.py 17 Feb 2004 21:54:20 -0000      1.7
  +++ loader.py 8 Mar 2004 22:28:09 -0000       1.8
  @@ -73,68 +73,86 @@
   from gump.utils.note import transferAnnotations, Annotatable
   from gump.utils import dump
   
  +from gump.config import dir, switch, setting
  +
   class WorkspaceLoader:
       def __init__(self):
           self.annotations=[]
           
  -    def load(self,file):
  -      """Builds a GOM in memory from the xml file. Return the generated GOM."""
  +    def load(self,file,quick=0):
  +        """Builds a GOM in memory from the xml file. Return the generated GOM."""
   
  -      if not os.path.exists(file):
  -        log.error('Workspace metadata file ['+file+'] not found')
  -        raise IOError, """Workspace %s not found!
  +        if not os.path.exists(file):
  +            log.error('Workspace metadata file ['+file+'] not found')
  +            raise IOError, """Workspace %s not found!
   
         You need to specify a valid workspace for Gump to run
         If you are new to Gump, simply copy minimal-workspace.xml
         to a file with the name of your computer (`hostname`.xml)
         and rerun this program.""" % file 
       
  -      #
  -      # Clear out the maps
  -      #
  -      XMLWorkspace.map={}
  -      XMLProfile.map={}
  -      XMLRepository.map={}
  -      XMLModule.map={}
  -      XMLProject.map={}
  -      XMLServer.map={}
  -      XMLTracker.map={}
  -    
  -      log.debug("Launch SAX Dispatcher onto : " + file);
  -              
  -      parser=SAXDispatcher(file,'workspace',XMLWorkspace)
  +        #
  +        # Clear out the maps
  +        #
  +        XMLWorkspace.map={}
  +        XMLProfile.map={}
  +        XMLRepository.map={}
  +        XMLModule.map={}
  +        XMLProject.map={}
  +        XMLServer.map={}
  +        XMLTracker.map={}
  +    
  +        log.debug("Launch SAX Dispatcher onto : " + file);
       
  -      # Extract the root XML
  -      xmlworkspace=parser.docElement
  +        o=0
  +        on=0
  +        try:
  +            if quick:
  +                # Hack, temporarily turn on optimization
  +                o=switch.optimize 
  +                on=switch.optimizenetwork
  +                switch.optimize=1 
  +                switch.optimizenetwork=1
  +          
  +            parser=SAXDispatcher(file,'workspace',XMLWorkspace)
       
  -      if not xmlworkspace:
  -        raise IOError, "Failed to load workspace" + file
  +            # Extract the root XML
  +            xmlworkspace=parser.docElement
       
  -      # Construct object around XML.
  -      workspace=Workspace(xmlworkspace)
  +            if not xmlworkspace:
  +                raise IOError, "Failed to load workspace" + file
  +    
  +            # Construct object around XML.
  +            workspace=Workspace(xmlworkspace)
         
  -      # Copy over any XML errors/warnings
  -      transferAnnotations(parser, workspace)
  +            # Copy over any XML errors/warnings
  +            transferAnnotations(parser, workspace)
     
  -      #
  -      # Cook the raw model...
  -      #
  -      workspace.complete(XMLProfile.map,XMLRepository.map,   \
  +            #
  +            # Cook the raw model...
  +            #
  +            workspace.complete(XMLProfile.map,XMLRepository.map,     \
                             XMLModule.map,XMLProject.map,      \
                             XMLServer.map, XMLTracker.map)
  -
  -      #
  -      # Clear out the maps [so don't continue to use them]
  -      #
  -      XMLWorkspace.map={}
  -      XMLModule.map={}
  -      XMLProject.map={}
  -      XMLProfile.map={}
  -      XMLRepository.map={}
  -      XMLTracker.map={}
  -      XMLServer.map={}
  +                          
  +        finally:
  +            #
  +            # Clear out the maps [so don't continue to use them]
  +            #
  +            XMLWorkspace.map={}
  +            XMLModule.map={}
  +            XMLProject.map={}
  +            XMLProfile.map={}
  +            XMLRepository.map={}
  +            XMLTracker.map={}
  +            XMLServer.map={}
     
  -      return workspace      
  +            if quick:
  +                # Hack, temporarily turn on optimization
  +                switch.optimize=o
  +                switch.optimizenetwork=on
  +                
  +        return workspace      
         
       def loadModule(self,url,workspace):
           
  
  
  
  1.2       +2 -2      gump/python/storage/results/resulter.py
  
  Index: resulter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/storage/results/resulter.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- resulter.py       28 Feb 2004 00:08:48 -0000      1.1
  +++ resulter.py       8 Mar 2004 22:28:09 -0000       1.2
  @@ -127,7 +127,7 @@
       

           # For all modules...

           for module in self.workspace.getModules():        

  -                if not self.gumpSet.inModules(module): continue

  +                if not self.gumpSet.inModuleSequence(module): continue

                   

                   #

                   # Generate results for this module, and

  @@ -141,7 +141,7 @@
                   

                   # Add projects

                   for project in module.getProjects():

  -                    if not self.gumpSet.inSequence(project): continue    

  +                    if not self.gumpSet.inProjectSequence(project): continue    

                       

                       #

                       # Add a project

  
  
  

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

Reply via email to