You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/07/07 18:29:41 UTC

cvs commit: gump/python/gump/model misc.py

ajack       2004/07/07 09:29:40

  Modified:    src/documentation/content/xdocs/metadata Tag: CleanUp
                        ant.xml
               python/gump Tag: CleanUp env.py update.py debug.py build.py
                        integrate.py
               python/gump/loader Tag: CleanUp loader.py
               python/gump/core Tag: CleanUp actor.py config.py gumprun.py
               python/gump/utils Tag: CleanUp http.py
               python/gump/document/xdocs Tag: CleanUp xdoc.py
               .        Tag: CleanUp gumpy.sh
               python/gump/model Tag: CleanUp misc.py
  Log:
  Try to fix caching. [retry, CVS woes]
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.5.4.2   +1 -1      gump/src/documentation/content/xdocs/metadata/ant.xml
  
  Index: ant.xml
  ===================================================================
  RCS file: /home/cvs/gump/src/documentation/content/xdocs/metadata/ant.xml,v
  retrieving revision 1.5.4.1
  retrieving revision 1.5.4.2
  diff -u -r1.5.4.1 -r1.5.4.2
  --- ant.xml	21 Jun 2004 04:06:10 -0000	1.5.4.1
  +++ ant.xml	7 Jul 2004 16:29:39 -0000	1.5.4.2
  @@ -48,7 +48,7 @@
           <td>
           	The ant target to invoke. <em>This can be a space separated list.</em>
           </td>
  -        <td>No Defaults to <strong>gump</strong>.</td>
  +        <td>No (defaults to no target).</td>
         </tr>
       </table>
       
  
  
  
  No                   revision
  No                   revision
  1.1.4.1   +1 -1      gump/python/gump/env.py
  
  Index: env.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/env.py,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- env.py	26 Apr 2004 01:00:33 -0000	1.1
  +++ env.py	7 Jul 2004 16:29:39 -0000	1.1.4.1
  @@ -41,7 +41,7 @@
       #    
       result = 1
              
  -    GumpEnvironment().checkEnvironment(1)
  +    GumpEnvironment().checkEnvironment(True)
   
       #
       log.info('Gump Environment Check complete. Exit code:' + str(result))
  
  
  
  1.29.2.5  +2 -2      gump/python/gump/update.py
  
  Index: update.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/update.py,v
  retrieving revision 1.29.2.4
  retrieving revision 1.29.2.5
  diff -u -r1.29.2.4 -r1.29.2.5
  --- update.py	16 Jun 2004 17:50:40 -0000	1.29.2.4
  +++ update.py	7 Jul 2004 16:29:39 -0000	1.29.2.5
  @@ -61,7 +61,7 @@
       workspace=WorkspaceLoader(options.isCache()).load(ws) 
       
       # Ensure we use text, not xdocs...
  -    options.setText(1)
  +    options.setText(True)
       
       # 
       options.setObjectives(OBJECTIVE_UPDATE)    
  
  
  
  1.6.2.5   +1 -1      gump/python/gump/debug.py
  
  Index: debug.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/debug.py,v
  retrieving revision 1.6.2.4
  retrieving revision 1.6.2.5
  diff -u -r1.6.2.4 -r1.6.2.5
  --- debug.py	16 Jun 2004 17:50:40 -0000	1.6.2.4
  +++ debug.py	7 Jul 2004 16:29:39 -0000	1.6.2.5
  @@ -56,7 +56,7 @@
       workspace=WorkspaceLoader(options.isCache()).load(ws) 
       
       # Ensure we use text, not xdocs...    
  -    options.setText(1)
  +    options.setText(True)
       
       # 
       options.setObjectives(OBJECTIVE_DEBUG)    
  
  
  
  1.48.2.5  +1 -1      gump/python/gump/build.py
  
  Index: build.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/build.py,v
  retrieving revision 1.48.2.4
  retrieving revision 1.48.2.5
  diff -u -r1.48.2.4 -r1.48.2.5
  --- build.py	16 Jun 2004 17:50:40 -0000	1.48.2.4
  +++ build.py	7 Jul 2004 16:29:39 -0000	1.48.2.5
  @@ -52,7 +52,7 @@
       workspace=WorkspaceLoader(options.isCache()).load(ws)    
           
       # Ensure we use text, not xdocs...
  -    options.setText(1)
  +    options.setText(True)
       
       # 
       options.setObjectives(OBJECTIVE_BUILD)
  
  
  
  1.28.2.4  +3 -3      gump/python/gump/integrate.py
  
  Index: integrate.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/integrate.py,v
  retrieving revision 1.28.2.3
  retrieving revision 1.28.2.4
  diff -u -r1.28.2.3 -r1.28.2.4
  --- integrate.py	11 Jun 2004 20:46:10 -0000	1.28.2.3
  +++ integrate.py	7 Jul 2004 16:29:39 -0000	1.28.2.4
  @@ -66,8 +66,8 @@
       logResourceUtilization('Before create run')
       
       # Has to be absolute latest descriptors, not quick/cached...
  -    options.setQuick(0)
  -    options.setCache(0)
  +    options.setQuick(False)
  +    options.setCache(False)
       
       # 
       options.setObjectives(OBJECTIVE_INTEGRATE)    
  
  
  
  No                   revision
  No                   revision
  1.1.2.10  +2 -2      gump/python/gump/loader/Attic/loader.py
  
  Index: loader.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/loader/Attic/loader.py,v
  retrieving revision 1.1.2.9
  retrieving revision 1.1.2.10
  diff -u -r1.1.2.9 -r1.1.2.10
  --- loader.py	28 Jun 2004 21:17:00 -0000	1.1.2.9
  +++ loader.py	7 Jul 2004 16:29:39 -0000	1.1.2.10
  @@ -30,7 +30,7 @@
   from gump.utils.timing import TimeStampSet
           
   class XmlLoader:
  -    def __init__(self,basedir='.',cache=True):
  +    def __init__(self,basedir='.',cache=False):
           self.annotations=[]
           self.basedir=basedir
           self.cache=cache
  @@ -188,7 +188,7 @@
                   log.debug("Skip Node: " + `child.nodeType` + ' ' + `child`)                       
       
   class ModelLoader:
  -    def __init__(self,cache=True):
  +    def __init__(self,cache=False):
           self.annotations=[]
           self.xmlloader=XmlLoader(cache)
           
  
  
  
  No                   revision
  No                   revision
  1.2.2.2   +8 -1      gump/python/gump/core/actor.py
  
  Index: actor.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/actor.py,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- actor.py	14 Jun 2004 21:31:45 -0000	1.2.2.1
  +++ actor.py	7 Jul 2004 16:29:39 -0000	1.2.2.2
  @@ -17,7 +17,14 @@
   
   """
   
  - A gump run (not 'run gump')
  +	An actor works upon the context tree. Events (and in the future,
  +	perhaps Requests) are passed to the Actor, and the Actor performs
  +	it's work.
  +	
  +	Example actors are:
  +	
  +		Statistician (keeps track of statistics, in a DB)
  +		
    
   """
   
  
  
  
  1.5.2.3   +2 -3      gump/python/gump/core/config.py
  
  Index: config.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/config.py,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- config.py	11 Jun 2004 20:46:10 -0000	1.5.2.2
  +++ config.py	7 Jul 2004 16:29:39 -0000	1.5.2.3
  @@ -99,12 +99,12 @@
       utctimeformat='%H:%M:%S (UTC)'
       
       timeout=60*60 # 60 minutes (in seconds)
  -    timeoutCommand=0
  +    timeoutCommand=False
       
   class switch:
       """Configuration of switches """   
       optimize=False # Optimize (at risk to exact correctness) anywhere one can
  -    optimizenetwork=True # Do least network traffic 
  +    optimizenetwork=False # Do least network traffic 
       debugging=False # Not debugging..
       
   def basicConfig():
  @@ -115,7 +115,6 @@
   
       if dir.base not in sys.path: 
           sys.path.insert(0, dir.base)
  -
   
   if __name__ == '__main__':
     def dump(section):
  
  
  
  1.9.2.11  +5 -6      gump/python/gump/core/gumprun.py
  
  Index: gumprun.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/core/gumprun.py,v
  retrieving revision 1.9.2.10
  retrieving revision 1.9.2.11
  diff -u -r1.9.2.10 -r1.9.2.11
  --- gumprun.py	25 Jun 2004 23:08:52 -0000	1.9.2.10
  +++ gumprun.py	7 Jul 2004 16:29:39 -0000	1.9.2.11
  @@ -485,14 +485,13 @@
       def getResolver(self):
           return self.resolver
           
  -        
       # Objectives...
       def setObjectives(self,objectives):
           self.objectives=objectives
           
       def testObjectiveIsSet(self,objective):
  -        if (self.objectives & objective): return 1
  -        return 0    
  +        if (self.objectives & objective): return True
  +        return False
           
       def isUpdate(self):
           return self.testObjectiveIsSet(OBJECTIVE_UPDATE)        
  @@ -517,8 +516,8 @@
           self.features = (self.features | feature)
           
       def testFeatureIsSet(self,feature):
  -        if (self.features & feature): return 1
  -        return 0
  +        if (self.features & feature): return True
  +        return False
   
       def isNotify(self):
           return self.testFeatureIsSet(FEATURE_NOTIFY)
  @@ -597,7 +596,7 @@
       def __init__(self, run, type):
           RunEvent.__init__(self,run)
           self.type=type
  -        self.satisfied=0
  +        self.satisfied=False
           
       def getType(self):
           return self.type
  
  
  
  No                   revision
  No                   revision
  1.10.4.3  +4 -2      gump/python/gump/utils/http.py
  
  Index: http.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/http.py,v
  retrieving revision 1.10.4.2
  retrieving revision 1.10.4.3
  diff -u -r1.10.4.2 -r1.10.4.3
  --- http.py	11 Jun 2004 17:09:49 -0000	1.10.4.2
  +++ http.py	7 Jul 2004 16:29:39 -0000	1.10.4.3
  @@ -65,11 +65,13 @@
       cachedHrefFile = cacheDir+'/'+quotedHref
   
       #download the file if not present in the cache
  -    usecached=0
  +    usecached=False
       if optimize or (switch.optimize and switch.optimizenetwork):
           if os.path.exists(cachedHrefFile):
             log.debug('Using cached descriptor for ' + href)
  -          usecached=1
  +          usecached=True
  +        else:          
  +          log.debug('No locally cached descriptor for ' + href)
             
       if not usecached:
         log.debug('Downloading (if date/timestamp changes) : '+href)      
  
  
  
  No                   revision
  No                   revision
  1.2.2.17  +1 -1      gump/python/gump/document/xdocs/xdoc.py
  
  Index: xdoc.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/xdocs/xdoc.py,v
  retrieving revision 1.2.2.16
  retrieving revision 1.2.2.17
  diff -u -r1.2.2.16 -r1.2.2.17
  --- xdoc.py	2 Jul 2004 14:25:31 -0000	1.2.2.16
  +++ xdoc.py	7 Jul 2004 16:29:40 -0000	1.2.2.17
  @@ -747,7 +747,7 @@
               self.context.writeLine('<body>')    
               self.context.writeLine('<table class="TRANSPARENT">')  
               self.context.writeLine(' <tr>')  
  -            self.context.writeLine(' <td><a href="%s/index.html">Index</a></td><td>|</td>' % self.rootpath) 
  +            self.context.writeLine(' <td><a href="%s/index.html">Run</a></td><td>|</td>' % self.rootpath) 
               self.context.writeLine(' <td><a href="%s/options.html">Options</a></td><td>|</td>' % self.rootpath) 
               self.context.writeLine(' <td><a href="%s/workspace.html">Workspace</a></td><td>|</td>' % self.rootpath) 
               self.context.writeLine(' <td><a href="%s/environment.html">Env</a></td><td>|</td>' % self.rootpath) 
  
  
  
  No                   revision
  No                   revision
  1.34.4.4  +1 -1      gump/gumpy.sh
  
  Index: gumpy.sh
  ===================================================================
  RCS file: /home/cvs/gump/gumpy.sh,v
  retrieving revision 1.34.4.3
  retrieving revision 1.34.4.4
  diff -u -r1.34.4.3 -r1.34.4.4
  --- gumpy.sh	17 Jun 2004 18:52:54 -0000	1.34.4.3
  +++ gumpy.sh	7 Jul 2004 16:29:40 -0000	1.34.4.4
  @@ -56,9 +56,9 @@
   fi
   
   # See if this tells us much.
  -times
  +#times
   
   # $Log$
  -# Revision 1.34.4.3  2004/06/17 18:52:54  ajack
  -# Chasing my Moby Dick .... performance.
  +# Revision 1.34.4.4  2004/07/07 16:29:40  ajack
  +# Try to fix caching. [retry, CVS woes]
   #
  
  
  
  No                   revision
  No                   revision
  1.1.2.7   +4 -5      gump/python/gump/model/Attic/misc.py
  
  Index: misc.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/Attic/misc.py,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- misc.py	30 Jun 2004 14:49:33 -0000	1.1.2.6
  +++ misc.py	7 Jul 2004 16:29:40 -0000	1.1.2.7
  @@ -137,12 +137,12 @@
           path=None
           
           if self.hasDomAttribute('nested'):
  -            path=os.path.abspath(	\
  -                    os.path.join(	self.owner.getModule().getWorkingDirectory(),	\
  +            path=os.path.abspath(
  +                    os.path.join(	self.owner.getModule().getWorkingDirectory(),
                                       self.getDomAttributeValue('nested')))
           elif self.hasDomAttribute('parent'):
  -            path=os.path.abspath(	\
  -                    os.path.join(self.owner.getWorkspace().getBaseDirectory(),	\
  +            path=os.path.abspath(
  +                    os.path.join(self.owner.getWorkspace().getBaseDirectory(),
                                    self.getDomAttributeValue('parent')))
                                    
           return path
  @@ -158,7 +158,6 @@
       def __init__(self,dom,owner):
           Resolvable.__init__(self,dom,owner)    
           
  -         
   class DirResolvable(ModelObject):
       """
       	Common code for getting a directory (attribute) and
  
  
  

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