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/model misc.py workspace.py builder.py
Date Wed, 30 Jun 2004 14:49:33 GMT
ajack       2004/06/30 07:49:33

  Modified:    python/gump/document/xdocs Tag: CleanUp xdoc.py
                        documenter.py
               .        Tag: CleanUp .cvsignore gumpytest.sh
               python/gump/model Tag: CleanUp misc.py workspace.py
                        builder.py
  Log:
  1) added <threads
  2) display in docs
  3) fixed <mkdir bug
  4) Exclude project files (for Python IDE)
  5) gumpytest reports GUMP_PYTHON
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.15  +1 -0      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.14
  retrieving revision 1.2.2.15
  diff -u -r1.2.2.14 -r1.2.2.15
  --- xdoc.py	26 Jun 2004 16:42:42 -0000	1.2.2.14
  +++ xdoc.py	30 Jun 2004 14:49:33 -0000	1.2.2.15
  @@ -749,6 +749,7 @@
               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/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) 
               self.context.writeLine(' <td><a href="%s/buildLog.html">Log</a></td><td>|</td>'
% self.rootpath)  
               self.context.writeLine(' <td><a href="%s/project_todos.html">Issues</a></td><td>|</td>'
% self.rootpath)  
  
  
  
  1.9.2.28  +5 -1      gump/python/gump/document/xdocs/documenter.py
  
  Index: documenter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/xdocs/documenter.py,v
  retrieving revision 1.9.2.27
  retrieving revision 1.9.2.28
  diff -u -r1.9.2.27 -r1.9.2.28
  --- documenter.py	29 Jun 2004 19:30:43 -0000	1.9.2.27
  +++ documenter.py	30 Jun 2004 14:49:33 -0000	1.9.2.28
  @@ -1,7 +1,6 @@
   #!/usr/bin/env python
   
   # Copyright 2003-2004 The Apache Software Foundation
  -#
   # Licensed under the Apache License, Version 2.0 (the "License");
   # you may not use this file except in compliance with the License.
   # You may obtain a copy of the License at
  @@ -588,6 +587,11 @@
           
           # Does this self.workspace send notification (nag) mails?
           detailsTable.createEntry("Send Notification E-mails: ", `self.workspace.isNotify()`)
  +        
  +        detailsTable.createEntry("Multi-threading: ", `self.workspace.isMultithreading()`)
  +        if self.workspace.isMultithreading():
  +            detailsTable.createEntry("Updater Threads: ", `self.workspace.getUpdaters()`)
   
  +            detailsTable.createEntry("Builder Threads: ", `self.workspace.getBuilders()`)
    
           
           #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>')
  
  
  
  No                   revision
  No                   revision
  1.23.2.2  +2 -1      gump/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/gump/.cvsignore,v
  retrieving revision 1.23.2.1
  retrieving revision 1.23.2.2
  diff -u -r1.23.2.1 -r1.23.2.2
  --- .cvsignore	23 Jun 2004 21:38:42 -0000	1.23.2.1
  +++ .cvsignore	30 Jun 2004 14:49:33 -0000	1.23.2.2
  @@ -25,4 +25,5 @@
   *_log.txt
   *_runlog.txt
   gumpy.lock
  -out.tmp
  \ No newline at end of file
  +out.tmp
  +*.wpr
  \ No newline at end of file
  
  
  
  1.7.4.3   +1 -0      gump/gumpytest.sh
  
  Index: gumpytest.sh
  ===================================================================
  RCS file: /home/cvs/gump/gumpytest.sh,v
  retrieving revision 1.7.4.2
  retrieving revision 1.7.4.3
  diff -u -r1.7.4.2 -r1.7.4.3
  --- gumpytest.sh	25 Jun 2004 16:40:37 -0000	1.7.4.2
  +++ gumpytest.sh	30 Jun 2004 14:49:33 -0000	1.7.4.3
  @@ -39,4 +39,5 @@
   # Perform some Gumpy unit test
   #
   cd python
  +echo "Run ... $GUMP_PYTHON gump/test/pyunit.py"
   $GUMP_PYTHON gump/test/pyunit.py
  
  
  
  No                   revision
  No                   revision
  1.1.2.6   +17 -6     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.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- misc.py	24 Jun 2004 16:30:09 -0000	1.1.2.5
  +++ misc.py	30 Jun 2004 14:49:33 -0000	1.1.2.6
  @@ -177,13 +177,14 @@
               dirString=self.getDomAttributeValue('dir')
               
               # Security attempt
  -            if dirString.contains('..'):
  +            # :TODO: Move to a one-time check
  +            if '..' in dirString:
                   self.owner.addError('Bad directory attribute %s on <%s' % \
                                       dirString, self.__class__.__name__)
                   dirString='bogus'
               
  -            path=os.path.abspath(    \
  -                    os.path.join(    self.owner.getModule().getWorkingDirectory(),    \
  +            path=os.path.abspath(
  +                    os.path.join(    self.owner.getModule().getWorkingDirectory(),
                                       dirString))
                                    
           return path 
  @@ -205,9 +206,19 @@
           path=None
           
           if self.hasDomAttribute('file'):
  -            path=os.path.abspath(    \
  -                    os.path.join(    self.owner.getModule().getWorkingDirectory(),    \
  -                                    self.getDomAttributeValue('file')))
  +            file=self.getDomAttributeValue('file')
  +            
  +            # Security attempt
  +            # :TODO: Move to a one-time check
  +            if '..' in file:
  +                self.owner.addError('Bad file attribute %s on <%s' % \
  +                                    file, self.__class__.__name__)
  +                file='bogus'
  +            
  +            
  +            path=os.path.abspath(
  +                    os.path.join(    self.owner.getModule().getWorkingDirectory(),
  +                                    file))
                                    
           return path    
           
  
  
  
  1.51.2.10 +44 -2     gump/python/gump/model/workspace.py
  
  Index: workspace.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/workspace.py,v
  retrieving revision 1.51.2.9
  retrieving revision 1.51.2.10
  diff -u -r1.51.2.9 -r1.51.2.10
  --- workspace.py	28 Jun 2004 21:17:00 -0000	1.51.2.9
  +++ workspace.py	30 Jun 2004 14:49:33 -0000	1.51.2.10
  @@ -59,13 +59,18 @@
       	# Named modules
       	# Named projects
       	# Named profiles
  -    	#
  +    	# Named servers
  +    	# Named trackers
       	self.repositories={}
           self.modules={}
           self.projects={}
           self.profiles={}
           self.servers={}
           self.trackers={}        
  +        
  +        # Treads
  +        self.updaters=0
  +        self.builders=0
                       
           # Set times
           self.initializeTimes()
  @@ -219,6 +224,24 @@
       def getSortedProjects(self):
           return self.sortedProjects       
           
  +        
  +    def isMultithreading(self):
  +        return self.hasUpdaters() or elf.hasBuilders()
  +        
  +    def hasUpdaters(self):
  +        return (0 < self.updaters)
  +        
  +    def getUpdaters(self):
  +        return self.updaters
  +        
  +    #:TODO: Note, not implemented yet
  +    def hasBuilders(self):
  +        return (0 < self.builders)
  +        
  +    #:TODO: Note, not implemented yet
  +    def getBuilders(self):
  +        return (0 < self.builders)
  +        
       def complete(self):        
           if self.isComplete(): return
           
  @@ -266,7 +289,7 @@
           if not os.path.exists(self.jardir): os.makedirs(self.jardir)
           if not os.path.exists(self.cvsdir): os.makedirs(self.cvsdir)
       
  -        #
  +        # Get all properties
       	PropertyContainer.importProperties(self,self.element)    	
       	
           # Complete all profiles
  @@ -312,6 +335,14 @@
               # Complete the project
               if not project.isComplete():
                   project.complete(self)   
  +                
  +        # Mutlithreading
  +        if self.hasChildElement('threads'):
  +            threads=self.getChildElement('threads')
  +            if hasDomAttribute(threads,'updaters'):
  +                self.updaters=int(getDomAttribute(threads,'updaters'))
  +            if hasDomAttribute(threads,'builders'):
  +                self.builders=int(getDomAttribute(threads,'builders'))
                                                                
           # Complete the properies
           self.completeProperties()
  @@ -460,6 +491,12 @@
           return self.cvsdir
   
       def getObjectForTag(self,tag,dom,name=None):
  +        """
  +        	If we are parsing  document (given this object as
  +        	parent context) then construct the child appropriately.
  +        	Sometimes that means splicing the new XML into the
  +        	existing.
  +        """
           object=None
           
           if 'profile' == tag:
  @@ -508,7 +545,12 @@
           return object
           
       def resolve(self):
  +        """
  +        
  +        	Work through the child elements extracting the
  +        	main objects.
           
  +        """
           if self.isResolved(): return
           
           log.info('Resolve ' + `self`)
  
  
  
  1.1.2.6   +12 -2     gump/python/gump/model/builder.py
  
  Index: builder.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/builder.py,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- builder.py	24 Jun 2004 16:30:09 -0000	1.1.2.5
  +++ builder.py	30 Jun 2004 14:49:33 -0000	1.1.2.6
  @@ -215,9 +215,17 @@
           # Import the buildfile
           self.buildfile=self.getDomAttributeValue('buildfile') # :TODO: Soon add ... ,'build.xml')
       	    
  +    def hasTarget(self):
  +        if self.target: return True
  +        return False
  +        
       def getTarget(self):
           return self.target
           
  +    def hasBuildFile(self):
  +        if self.buildfile: return True
  +        return False
  +        
       def getBuildFile(self):
           return self.buildfile
                   
  @@ -225,8 +233,10 @@
           """ Display the contents of this object """
           Builder.dump(self,indent,output)
           i=getIndent(indent+1)
  -        output.write(i+'Target: ' + self.getTarget() + '\n')
  -        output.write(i+'BuildFile: ' + self.getBuildFile() + '\n')
  +        if self.hasTarget():
  +            output.write(i+'Target: ' + self.getTarget() + '\n')
  +        if self.hasBuildFile():
  +            output.write(i+'BuildFile: ' + self.getBuildFile() + '\n')
   
   # represents an <maven/> element
   class Maven(Builder):
  
  
  

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


Mime
View raw message