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/06/21 17:53:31 UTC

cvs commit: gump/python/gump/build builder.py

ajack       2004/06/21 08:53:31

  Modified:    template/xhtml/css Tag: CleanUp style.css
               python/gump/model Tag: CleanUp propagation.py misc.py
               python/gump/document/xdocs Tag: CleanUp xdoc.py
               python/gump/loader Tag: CleanUp loader.py
               python/gump/document Tag: CleanUp documenter.py
               .        Tag: CleanUp gumpytest.sh
               python/gump/build Tag: CleanUp builder.py
  Added:       template/xhtml Tag: CleanUp favicon.ico
  Removed:     python/gump/model Tag: CleanUp rawmodel.py
  Log:
  Cosmetic tweaks (to XHTML/CSS).
  i.e the sort of distraction I wanted to avoid by using XDOCS only. ;-)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.4   +1 -1      gump/template/xhtml/css/Attic/style.css
  
  Index: style.css
  ===================================================================
  RCS file: /home/cvs/gump/template/xhtml/css/Attic/style.css,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- style.css	18 Jun 2004 14:58:16 -0000	1.1.2.3
  +++ style.css	21 Jun 2004 15:53:30 -0000	1.1.2.4
  @@ -1 +1 @@
  -img          { border: 0 }

HR { color: #8EB4D9; height: 1px; text-align: center; width: 90%; position: 
               relative }

# Annotations
.DEBUG    	{	background-color: #000000 }
.INFO    	{	background-color: #00FF00 }               
.WARN		{	background-color: #00FFFF }
.ERROR		{	background-color: #FF0000 }

# State
.SUCCESS		{	background-color: #00FF00 }
.FAILED 		{	background-color: #FF0000 }
.PREREQFAILED	{	background-color: #00FFFF }
  \ No newline at end of file
  +img          { border: 0 }

HR { color: #8EB4D9; height: 1px; text-align: center; width: 90%; position: 
               relative }

TABLE.TRANSPARENT	{	border: none; width: 100% }
TABLE	{	 border: thin solid #000000; width: 100%  }

# Annotations
.DEBUG    	{	background-color: #000000 }
.INFO    	{	background-color: #99CC66 }               
.WARN		{	background-color: #FFFF99 }
.ERROR	{	background-color: #CC0000 }

# State
.SUCCESS		{	background-color: #99CC66 }
.FAILED 		{	background-color: #CC0000; foreground-color: #FFFFFF }
.PREREQFAILED	{	background-color: #FFFF99 }
.COMPLETE		{	background-color: #00CCFF }
.UNSET		{	background-color: #CCCCCC }
  \ No newline at end of file
  
  
  
  No                   revision
  No                   revision
  1.3.4.1   +1 -4      gump/python/gump/model/propagation.py
  
  Index: propagation.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/propagation.py,v
  retrieving revision 1.3
  retrieving revision 1.3.4.1
  diff -u -r1.3 -r1.3.4.1
  --- propagation.py	22 Apr 2004 22:58:16 -0000	1.3
  +++ propagation.py	21 Jun 2004 15:53:30 -0000	1.3.4.1
  @@ -75,9 +75,6 @@
               for object in self.getChildren():
                   object.changeState(state,reason,cause,message)        
                               
  -    def setCause(self,cause):
  -        if not self.cause: self.cause=cause
  -        
       def hasCause(self):
           return self.cause
           
  @@ -85,7 +82,7 @@
           return self.cause
           
       def addCause(self,cause):
  -        if not self.cause: self.setCause(cause)
  +        if not self.cause: self.cause=cause
           self.causes.append(cause)
           
       def getCauses(self):
  
  
  
  1.1.2.4   +55 -11    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.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- misc.py	18 Jun 2004 14:58:17 -0000	1.1.2.3
  +++ misc.py	21 Jun 2004 15:53:30 -0000	1.1.2.4
  @@ -151,22 +151,66 @@
   class JunitReport(Resolvable):
       def __init__(self,dom,owner):
           Resolvable.__init__(self,dom,owner)    
  -    
  -# represents a <mkdir/> element
  -class Mkdir(Resolvable):
  -    def __init__(self,dom,owner):
  -        Resolvable.__init__(self,dom,owner)    
  -
  -# represents a <delete/> element
  -class Delete(Resolvable): 
  -    def __init__(self,dom,owner):
  -        Resolvable.__init__(self,dom,owner)    
  -
  +   
  + 
   # represents a <work/> element
   class Work(Resolvable): 
       def __init__(self,dom,owner):
           Resolvable.__init__(self,dom,owner)    
           
  +        
  +         
  +class DirResolvable(ModelObject):
  +    """
  +    	Common code for getting a directory (attribute) and
  +    	returning that as a path relative to the 
  +    """
  +    def __init__(self,dom,owner):
  +        ModelObject.__init__(self,dom,owner)   
  +        
  +    def hasDirectory(self):
  +        return self.hasDomAttribute('dir')             
  +        
  +    def getDirectory(self):  
  +        path=None
  +        
  +        if self.hasDomAttribute('dir'):
  +            dirString=self.getDomAttributeValue('dir')
  +            
  +            # Security attempt
  +            if dirString.contains('..'):
  +                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(),    \
  +                                    dirString))
  +                                 
  +        return path 
  +        
  +# represents a <mkdir/> element
  +class Mkdir(DirResolvable):
  +    def __init__(self,dom,owner):
  +        DirResolvable.__init__(self,dom,owner) 
  +        
  +# represents a <delete/> element
  +class Delete(DirResolvable): 
  +    def __init__(self,dom,owner):
  +        DirResolvable.__init__(self,dom,owner)    
  + 
  +    def hasFile(self):
  +        return self.hasDomAttribute('file')             
  +        
  +    def getFile(self):  
  +        path=None
  +        
  +        if self.hasDomAttribute('file'):
  +            path=os.path.abspath(    \
  +                    os.path.join(    self.owner.getModule().getWorkingDirectory(),    \
  +                                    self.getDomAttributeValue('file')))
  +                                 
  +        return path    
           
   class AddressPair:
       def __init__(self,toAddr,fromAddr):
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +1 -0      gump/template/xhtml/Attic/favicon.ico
  
  	<<Binary file>>
  
  
  No                   revision
  No                   revision
  1.2.2.10  +9 -10     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.9
  retrieving revision 1.2.2.10
  diff -u -r1.2.2.9 -r1.2.2.10
  --- xdoc.py	20 Jun 2004 19:36:54 -0000	1.2.2.9
  +++ xdoc.py	21 Jun 2004 15:53:30 -0000	1.2.2.10
  @@ -526,13 +526,13 @@
               
       def start(self):
           if self.config.isXhtml():    
  -            self.context.writeLineIndented('<table><tr><td class="WARN"><p>')
  +            self.context.writeLineIndented('<table><tr><td class="NOTE">')
           else:
               self.context.writeLineIndented('<note>')    
           
       def end(self):
           if self.config.isXhtml():    
  -            self.context.writeLine('</p></td></tr></table>')
  +            self.context.writeLine('</td></tr></table>')
           else:
               self.context.writeLine('</note>')
           
  @@ -562,13 +562,13 @@
           
       def start(self):
           if self.config.isXhtml():    
  -            self.context.writeLineIndented('<table><tr><td class="WARN"><p>')
  +            self.context.writeLineIndented('<table><tr><td class="WARN">')
           else:
               self.context.writeLineIndented('<warning>')    
           
       def end(self):
           if self.config.isXhtml():    
  -            self.context.writeLine('</p></td></tr></table>')
  +            self.context.writeLine('</td></tr></table>')
           else:
               self.context.writeLine('</warning>')
           
  @@ -737,19 +737,18 @@
               self.context.writeLine('  <link rel="stylesheet" type="text/css" href="%s/css/style.css" title="Style"/>' % self.rootpath)
               
               self.context.writeLine(' </head>')
  -            self.context.writeLine('<body>')  
  -            self.context.writeLine('<img align="right" src="%s/images/gump-logo.png" alt="Logo"/>' % self.rootpath) 
  -            self.context.writeLine('<br clear="all"/>')   
  -            self.context.writeLine('<table>')  
  +            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/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)  
               self.context.writeLine(' <td><a href="%s/gump_stats/index.html">Stats</a></td><td>|</td>' % self.rootpath)  
  -            self.context.writeLine(' <td><a href="%s/gump_xref/index.html">XRef</a></td><td>|</td>' % self.rootpath)  
  +            self.context.writeLine(' <td><a href="%s/gump_xref/index.html">XRef</a></td>' % self.rootpath) 
  +            
  +            self.context.writeLine(' <td colspan="3"><img align="right" src="%s/images/gump-logo.png" alt="Logo"/></td>' % self.rootpath)  
               self.context.writeLine(' </tr>')  
               self.context.writeLine('</table>')  
  -            self.context.writeLine('<hr/>')     
           else: 
               self.context.writeLine('<?xml version="1.0" encoding="ISO-8859-1"?>')
               self.context.writeLine('<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "./dtd/document-v11.dtd">')
  
  
  
  No                   revision
  No                   revision
  1.1.2.7   +1 -1      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.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- loader.py	20 Jun 2004 19:36:54 -0000	1.1.2.6
  +++ loader.py	21 Jun 2004 15:53:30 -0000	1.1.2.7
  @@ -162,7 +162,7 @@
               task.setFailed(str(details))
         
       def postProcess(self,task,dom):        
  -        log.debug("Post Process DOM : " + `dom`)   
  +        #log.debug("Post Process DOM : " + `dom`)   
           
           taskList=task.getOwner()
           
  
  
  
  No                   revision
  No                   revision
  1.17.2.1  +1 -1      gump/python/gump/document/documenter.py
  
  Index: documenter.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/documenter.py,v
  retrieving revision 1.17
  retrieving revision 1.17.2.1
  diff -u -r1.17 -r1.17.2.1
  --- documenter.py	27 May 2004 16:47:51 -0000	1.17
  +++ documenter.py	21 Jun 2004 15:53:30 -0000	1.17.2.1
  @@ -69,7 +69,7 @@
               raise RuntimeError, \
                       'Class [' + `self.__class__` + '] needs a callable documentRun(self,run)'
           
  -        log.debug('Document run using [' + `self` + ']')
  +        log.info('Document run using [' + `self` + ']')
           
           self.documentRun()
           
  
  
  
  No                   revision
  No                   revision
  1.7.4.1   +13 -1     gump/gumpytest.sh
  
  Index: gumpytest.sh
  ===================================================================
  RCS file: /home/cvs/gump/gumpytest.sh,v
  retrieving revision 1.7
  retrieving revision 1.7.4.1
  diff -u -r1.7 -r1.7.4.1
  --- gumpytest.sh	20 Mar 2004 19:28:29 -0000	1.7
  +++ gumpytest.sh	21 Jun 2004 15:53:30 -0000	1.7.4.1
  @@ -22,7 +22,19 @@
   export
   
   #
  +# Determine the Python to use...
  +# 
  +export GUMP_PYTHON="`which python2.3`"
  +if [ "" == "$GUMP_PYTHON" ] ; then
  + export GUMP_PYTHON="`which python`"
  + if [ "" == "$GUMP_PYTHON" ] ; then
  + 	echo "No Python (python2.3 nor python) found in path."
  + 	exit 1
  + fi
  +fi
  +
  +#
   # Perform some Gumpy unit test
   #
   cd python
  -python gump/test/pyunit.py
  \ No newline at end of file
  +$GUMP_PYTHON gump/test/pyunit.py
  \ No newline at end of file
  
  
  
  No                   revision
  No                   revision
  1.4.2.3   +6 -16     gump/python/gump/build/builder.py
  
  Index: builder.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/build/builder.py,v
  retrieving revision 1.4.2.2
  retrieving revision 1.4.2.3
  diff -u -r1.4.2.2 -r1.4.2.3
  --- builder.py	11 Jun 2004 17:09:52 -0000	1.4.2.2
  +++ builder.py	21 Jun 2004 15:53:31 -0000	1.4.2.3
  @@ -188,20 +188,16 @@
           #
           # Delete a directory and/or a file
           #
  -        # :TODO: Before turning this on, we need to ensure that the command
  -        # will not self.run wild. We need to ensure that there is no ";" and we
  -        # need to ensure the directory/file is under the workspace.
  -        #
  -        if delete.dir:
  -            dir=os.path.abspath(os.path.join(basedir,delete.dir))
  +        if delete.hasDirectory():
  +            dir=delete.getDirectory()
               try:
                   os.rmdir(dir)
                   project.addInfo('Deleted directory ['+dir+']')
               except:
                   project.addError('Failed to delete directory ['+dir+']')
                   raise
  -        elif delete.file:
  -            file=os.path.abspath(os.path.join(basedir,delete.file))
  +        elif delete.hasFile():
  +            file=delete.getFile()
               try:
                   os.remove(file)
                   project.addInfo('Deleted file ['+file+']')
  @@ -219,9 +215,8 @@
           #
           # Make a directory
           #
  -        if mkdir.dir:
  -            
  -            dirToMake=os.path.abspath(os.path.join(basedir,mkdir.dir))
  +        if mkdir.hasDirectory(): 
  +            dirToMake=delete.getDirectory()
               try:
                   if not os.path.exists(dirToMake):
                       os.makedirs(dirToMake)
  @@ -242,11 +237,6 @@
           
           startedOk =  project.okToPerformWork()
               
  -        #
  -        #
  -        # NOTE --------------- NOT TURNED ON YET!!!!!!
  -        # Security concerns...
  -        #
           #
           if 0 and project.okToPerformWork():        
               # Deletes...
  
  
  

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