gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: gump/project depot.xml
Date Mon, 12 Apr 2004 18:57:37 GMT
ajack       2004/04/12 11:57:37

  Modified:    python/gump/model project.py stats.py
               python/gump/utils work.py __init__.py http.py tools.py
                        sync.py
               .        gumpy.py
               python/gump check.py commandLine.py debug.py __init__.py
                        gumpenv.py engine.py build.py
               python/gump/document forrest.py
               python   header.txt
               project  depot.xml
  Added:       .        commitCheck.py
  Log:
  1) working on commitCheck.py
  2) working on results from PyChecker
  3) See if have fixed wrapLine (was passing params in wrong order)
  
  Revision  Changes    Path
  1.74      +2 -3      gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- project.py	8 Apr 2004 14:14:23 -0000	1.73
  +++ project.py	12 Apr 2004 18:57:36 -0000	1.74
  @@ -974,9 +974,8 @@
           """ Display the contents of this object """
           output.write(getIndent(indent)+'Project: ' + self.getName() + '\n')
           NamedModelObject.dump(self, indent+1, output)
  -        
  -        for dependency in self.depends:
  -            dependency.dump(indent+1,output)
  +                
  +        Dependable.dump(self,indent,output)
                           
           if self.ant:
               self.ant.dump(indent+1,output)
  
  
  
  1.18      +4 -4      gump/python/gump/model/stats.py
  
  Index: stats.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/stats.py,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- stats.py	3 Apr 2004 17:32:18 -0000	1.17
  +++ stats.py	12 Apr 2004 18:57:36 -0000	1.18
  @@ -63,8 +63,8 @@
       # 'odds of success' (based off historical results).
       #
       def getHistoricalOddsOfSuccess(self):
  -        good=self.successes
  -        bad=(self.failures+self.prereqs)
  +        good=self.successes or 0
  +        bad=(self.failures+self.prereqs) or 0
           total=(good+bad) or 1
           return float(good)/float(total)
           
  @@ -117,9 +117,9 @@
               if not self.first:
                   self.first=self.last
               elif statable.isFailed():
  -                s.failures += 1    
  +                self.failures += 1    
               elif statable.isPrereqFailed():                        
  -                s.prereqs  += 1
  +                self.prereqs  += 1
               
           elif statable.isFailed():
               self.failures += 1
  
  
  
  1.14      +1 -0      gump/python/gump/utils/work.py
  
  Index: work.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/work.py,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- work.py	15 Mar 2004 22:07:06 -0000	1.13
  +++ work.py	12 Apr 2004 18:57:36 -0000	1.14
  @@ -24,6 +24,7 @@
   from gump.model.state import *
   from gump.utils.owner import *
   from gump.utils.launcher import *
  +from gump.utils import *
   
                  
   WORK_TYPE_CHECK=1
  
  
  
  1.29      +2 -2      gump/python/gump/utils/__init__.py
  
  Index: __init__.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/__init__.py,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- __init__.py	9 Apr 2004 22:38:25 -0000	1.28
  +++ __init__.py	12 Apr 2004 18:57:36 -0000	1.29
  @@ -169,7 +169,7 @@
           
       return (hours, mins, secs)
       
  -def secsToElapsedString(secs):
  +def secsToElapsedTimeString(secs):
       return elapsedTimeTripleToString(secsToElapsedTimeTriple(secs))           
       
   def elapsedTimeTripleToString(elapsed):
  @@ -404,7 +404,7 @@
     #dump(log)
   
     print "secsToElapsedTimeTriple(1340) : " + str(secsToElapsedTimeTriple(1340))
  -  print "secsToElapsedString(1340) : " + secsToElapsedString(1340)
  +  print "secsToElapsedTimeString(1340) : " + secsToElapsedTimeString(1340)
     print "secsToTime(1340) : " + secsToTime(1340)
     print "elapsedTimeTripleToString(secsToElapsedTimeTriple(1340)) : " + elapsedTimeTripleToString(secsToElapsedTimeTriple(1340))
     print "Date (for SMTP) : " + time.strftime('%d %b %y %H:%M:%S')
  
  
  
  1.9       +0 -1      gump/python/gump/utils/http.py
  
  Index: http.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/http.py,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- http.py	16 Mar 2004 19:50:15 -0000	1.8
  +++ http.py	12 Apr 2004 18:57:36 -0000	1.9
  @@ -19,7 +19,6 @@
   """
   
   import os.path
  -import os
   import shutil
   import string
   import sys
  
  
  
  1.21      +1 -1      gump/python/gump/utils/tools.py
  
  Index: tools.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/tools.py,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- tools.py	15 Mar 2004 22:07:06 -0000	1.20
  +++ tools.py	12 Apr 2004 18:57:36 -0000	1.21
  @@ -188,7 +188,7 @@
                   # Wrap if requested
                   #
                   if wrapLen:
  -                    wline=wrapLine(line,eol,marker,wrapLen)
  +                    wline=wrapLine(line,wrapLen,eol,marker)
                   else:
                       wline=line
                   
  
  
  
  1.8       +2 -2      gump/python/gump/utils/sync.py
  
  Index: sync.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/utils/sync.py,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- sync.py	15 Mar 2004 22:07:06 -0000	1.7
  +++ sync.py	12 Apr 2004 18:57:36 -0000	1.8
  @@ -72,11 +72,11 @@
           names = os.listdir(src)
           try:
               result = os.stat(dst)
  -        except Exception, details:
  +        except Exception:
               result = None
           # handle case where result exists but is not a directory    
           if result and not S_ISDIR(result[ST_MODE]):
  -            remove(dst)
  +            os.remove(dst)
               result = None
           if not result:    
               os.makedirs(dst)
  
  
  
  1.16      +2 -1      gump/gumpy.py
  
  Index: gumpy.py
  ===================================================================
  RCS file: /home/cvs/gump/gumpy.py,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- gumpy.py	10 Apr 2004 23:09:29 -0000	1.15
  +++ gumpy.py	12 Apr 2004 18:57:37 -0000	1.16
  @@ -1,4 +1,5 @@
  -#!/bin/bash
  +#!/usr/bin/env python
  +
   #
   #   Copyright 2003-2004 The Apache Software Foundation
   #
  
  
  
  1.1                  gump/commitCheck.py
  
  Index: commitCheck.py
  ===================================================================
  #!/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
  #
  #       http://www.apache.org/licenses/LICENSE-2.0
  #
  #   Unless required by applicable law or agreed to in writing, software
  #   distributed under the License is distributed on an "AS IS" BASIS,
  #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  #   See the License for the specific language governing permissions and
  #   limitations under the License.
  #
  # $Header: /home/cvs/gump/commitCheck.py,v 1.1 2004/04/12 18:57:37 ajack Exp $
  
  """
    Used to do Python testing prior to commiting a code change.
  """
  
  import os.path
  import os
  import sys
  import socket
  import time
  import signal
  import smtplib
  import StringIO
  from xml.dom import minidom
  
  LINE=' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GUMP'
  
  def ignoreHangup(signum):
      pass
      
  def runCommand(command,args='',dir=None,outputFile=None):
      """ Run a command, and check the result... """
      
      #    
      originalCWD=None
      if dir:     
          originalCWD=os.getcwd()
          cwdpath=os.path.abspath(dir)
          try:
              log.write('Executing with CWD: [' + dir + ']\n')    
              if not os.path.exists(cwdpath): os.makedirs(dir)
              os.chdir(cwdpath)
          except Exception, details :
              # Log the problem and re-raise
              log.write('Failed to create/change CWD [' + cwdpath + ']. Details: ' + str(details)
+ '\n')
              return 0
                
      try:
          
          #
          if not outputFile:
              outputFile=os.tmpnam()
          
          fullCommand = command + ' ' + args + ' >' + outputFile + ' 2>&1'    
          log.write('Execute : ' + fullCommand + '\n')
         
          #
          # Execute Command & Calculate Exit Code
          #
          systemReturn=os.system(fullCommand)
          
          if not os.name == 'dos' and not os.name == 'nt':
              waitcode=systemReturn
          
              #
              # The return code (from system = from wait) is (on Unix):
              #
              #    a 16 bit number
              #    top byte    =    exit status
              #    low byte    =    signal that killed it
              #
              exit_code=(((waitcode & 0xFF00) >> 8) & 0xFF)
          
          else:
              exit_code=systemReturn
      
          if os.path.exists(outputFile):
              if os.path.getsize(outputFile) > 0:
                  catFile(log,outputFile)            
              os.remove(outputFile)
          
          log.write('Exit Code : ' + `exit_code` + '\n')
      
      finally:
          if originalCWD: os.chdir(originalCWD)
        
      return exit_code
  
  def catFile(output,file,title=None):
      """ Cat a file to a stream... """
      if title:
          output.write(LINE + '\n')    
          output.write(title + '\n\n')
          
      input=open(file,'r')
      line = input.readline()
      while line:
          output.write(line)
          # Next...
          line = input.readline()
          
  # Allow a lock
  lockFile=os.path.abspath('gumpy_check.lock')
  if os.path.exists(lockFile):
      # :TODO: Ought we look at the contents, get the PID of the
      # supposed other Gump, and determine if it is still alive
      # or not?
      print """The lock file [%s] exists. 
  Either Gump is still running, or it terminated very abnormally.    
  Please resolve this (waiting or removing the lock file) before retrying.
      """ % lockFile
      sys.exit(1)
      
  # Set the signal handler to ignore hangups
  try:
      # Not supported by all OSs
      # :TODO: Does the variable signal.SIG_HUP even exist? Test
      # this code on Linux w/o the try/except.
      signal.signal(signal.SIG_HUP, ignoreHangup)
  except:
      pass
      
  # Write this PID into a lock file
  lock=open(lockFile,'w')
  lock.write(`os.getpid()`)
  lock.close()
  
  # Enable a log
  logFile=os.path.abspath('gumpy__check_log.txt')
  log=open(logFile,'w',0) # Unbuffered...
  
  result=0
          
  args=sys.argv
  try:
  
      try:
          
          # Process Environment
          hostname = socket.gethostname()
  
          log.write('- GUMP run on host   : ' + hostname + '\n')
          log.write('- GUMP run @         : ' + time.strftime('%d %b %y %H:%M:%S', time.gmtime())
+ '\n')
          log.write('- GUMP run by Python : ' + `sys.version` + '\n')
          log.write('- GUMP run on OS     : ' + `os.name` + '\n')
          log.write('- GUMP run in env    : \n')
          
          #
          # Add Gump to Python Path...
          #
          pythonPath=''
          if os.environ.has_key('PYTHONPATH'):
              pythonPath=os.environ['PYTHONPATH']
              pythonPath+=os.pathsep
          absGumpPython=os.path.abspath(os.path.join(os.getcwd(),'python'))
          if not str(absGumpPython) in pythonPath:
              pythonPath+=str(absGumpPython)
          log.write('- GUMP PYTHONPATH    :  ' + pythonPath + '\n')
          os.environ['PYTHONPATH']=pythonPath
  
          #
          # Do NOT Update Gump from CVS
          # :TODO: Debatable...
          #    
          os.environ['GUMP_NO_CVS_UPDATE']='DO NOT UPDATE'
              
          # :TODO: Need to remove all *.pyc (other than this one)
          # because a Gump refactor can leave old/stale compiled
          # classes around.
          
          #try:
          #    # :TODO: PyChecker
          #    check=''
          #    for m in ['gump','gump/document','gump/model']:
          #        if check: check += ' '
          #        mPath=os.path.join(absGumpPython,m)
          #        check += str(mPath)
          #    print "Python Checker : [" + check + "]"
          #    os.environ['PYCHECKER'] =  check
          #    import pychecker.checker   
          #except:
          #    print 'Failed to PyChecker code...'
          #    pass
          possiblePackages=[]     
          for dirpath, dirs, files in os.walk(os.path.abspath(os.path.join(absGumpPython,'gump'))):
              possiblePackages.append(dirpath)
          
          
          # :TODO: Make dynamic (use os.walk or something)
          for p in possiblePackages:
              if not result:
                  check=''
                  for file in os.listdir(p):
                      if file.endswith('.py'):
                          if check: check += ' '
                          check += str(os.path.join(p,file))
                  if check:
                      # print "Python Checker : [" + check + "]"        
                      checkerExit=runCommand('pychecker',check,str(absGumpPython))
                      #if checkerExit:
                      #    result=1
          
          if not result:
              # PyUnit            
              unitExit = runCommand('python gump/test/pyunit.py','*',str(absGumpPython))
              if unitExit:
                  result=1
              
          if not result:
              # A test run...
              integrationExit = runCommand('gumpy')
              if integrationExit:
                  result=1           
  
      except KeyboardInterrupt:    
          log.write('Terminated by user interrupt...\n')
          result = 1
          raise
          
      except:    
          log.write('Terminated unintentionally...\n')
          result = 1
          raise
      
  finally:
      # Close the log
      log.close()
      
      # :TODO: We have issues when python is killed, we get a lock
      # left around despite this finally.
      os.remove(lockFile)
      
      if 1 or result:
          logTitle='The Apache Gump log...'
          catFile(sys.stdout, logFile, logTitle)
          
  # bye!
  sys.exit(result)
  
  
  
  1.42      +0 -3      gump/python/gump/check.py
  
  Index: check.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/check.py,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- check.py	16 Mar 2004 23:08:15 -0000	1.41
  +++ check.py	12 Apr 2004 18:57:37 -0000	1.42
  @@ -24,10 +24,7 @@
   """
   
   import os.path
  -import os
   import sys
  -import logging
  -
   
   from gump import log
   from gump.engine import GumpEngine
  
  
  
  1.5       +0 -4      gump/python/gump/commandLine.py
  
  Index: commandLine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/commandLine.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- commandLine.py	6 Apr 2004 17:45:33 -0000	1.4
  +++ commandLine.py	12 Apr 2004 18:57:37 -0000	1.5
  @@ -19,10 +19,6 @@
       Commandline Handling
       
   """
  -
  -import socket
  -import time
  -import os
   import sys
   import logging
   
  
  
  
  1.3       +0 -1      gump/python/gump/debug.py
  
  Index: debug.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/debug.py,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- debug.py	16 Mar 2004 23:02:50 -0000	1.2
  +++ debug.py	12 Apr 2004 18:57:37 -0000	1.3
  @@ -23,7 +23,6 @@
   """
   
   import os.path
  -import os
   import sys
   import logging
   
  
  
  
  1.21      +9 -25     gump/python/gump/__init__.py
  
  Index: __init__.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/__init__.py,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- __init__.py	20 Nov 2003 20:51:49 -0000	1.20
  +++ __init__.py	12 Apr 2004 18:57:37 -0000	1.21
  @@ -59,24 +59,7 @@
   # <http://www.apache.org/>.
   
   """
  -  Gump core functionality.
  -
  -  It contains a sax dispatcher tool, a dependency
  -  walker, and an object model (GOM) which is built from an xmlfile using
  -  the sax dispatcher.
  -
  -  The idea is that a subclass of GumpModelObject is used for each of the various
  -  xml tags which can appear in a gump profile, with a saxdispatcher
  -  generating a tree of GumpModelObject objects from the profile, dynamically
  -  merging as it finds href references.
  -
  -  You can then use the dependencies() method to get an ordered, flat vector
  -  of the projects in the profile.
  -
  -  Then there's some basic procedures to work with the GOM, like load().
  -
  -  For basic usage patterns, look at the gump.view module or the gump.build
  -  module.
  +  Gump Entry Points.
   """
   
   import os.path
  @@ -86,9 +69,13 @@
   import sys
   import time
   
  -# python-2.3 or http://www.red-dove.com/python_logging.html
  +# Either python-2.3 or http://www.red-dove.com/python_logging.html
   import logging
   
  +
  +# tell Python what modules make up the gump package
  +__all__ = ["config"]
  +
   # base gump logger
   log = logging.getLogger(__name__)
   
  @@ -97,9 +84,6 @@
   ###############################################################################
   # Initialize
   ###############################################################################
  -
  -# tell Python what modules make up the gump package
  -__all__ = ["config", "integrate"]
   
   # init logging
   logging.basicConfig()
  
  
  
  1.7       +1 -1      gump/python/gump/gumpenv.py
  
  Index: gumpenv.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/gumpenv.py,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- gumpenv.py	6 Apr 2004 17:30:09 -0000	1.6
  +++ gumpenv.py	12 Apr 2004 18:57:37 -0000	1.7
  @@ -22,7 +22,6 @@
   """
   
   import os.path
  -import os
   import sys
   from fnmatch import fnmatch
   
  @@ -47,6 +46,7 @@
       def __init__(self):
           Annotatable.__init__(self)
           Workable.__init__(self)
  +        Propogatable.__init__(self)
           Stateful.__init__(self)
           
           #
  
  
  
  1.100     +0 -9      gump/python/gump/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/engine.py,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- engine.py	10 Apr 2004 23:09:29 -0000	1.99
  +++ engine.py	12 Apr 2004 18:57:37 -0000	1.100
  @@ -20,7 +20,6 @@
   """
   
   import os.path
  -import os
   import sys
   from fnmatch import fnmatch
   
  @@ -858,14 +857,6 @@
               #
               logResourceUtilization('Before nag')
               nag(run)  
  -    
  -    def updateStatistics(self,run):
  -        
  -        # Update Statistics/Results on full runs            
  -        if run.getGumpSet().isFull():
  -            
  -            logResourceUtilization('Before statistics update')
  -            self.updateStatistics(run)
           
       def gatherResults(self,run):
           #
  
  
  
  1.46      +0 -2      gump/python/gump/build.py
  
  Index: build.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/build.py,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- build.py	16 Mar 2004 21:04:47 -0000	1.45
  +++ build.py	12 Apr 2004 18:57:37 -0000	1.46
  @@ -25,9 +25,7 @@
   """
   
   import os.path
  -import os
   import sys
  -import logging
   
   from gump import log
   from gump.engine import GumpEngine
  
  
  
  1.141     +68 -67    gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- forrest.py	11 Apr 2004 15:18:43 -0000	1.140
  +++ forrest.py	12 Apr 2004 18:57:37 -0000	1.141
  @@ -379,7 +379,7 @@
           detailsTable=detailsSection.createTable()
           detailsTable.createEntry("State : ", workspace.getStateDescription()) 
   
  -        e = secsToElapsedString(workspace.getElapsedSecs())
  +        e = secsToElapsedTimeString(workspace.getElapsedSecs())
           if e : detailsTable.createEntry("Elapsed Time : ", e)
           detailsTable.createEntry("Base Directory : ", workspace.getBaseDirectory())
           detailsTable.createEntry("Temporary Directory : ", workspace.tmpdir)
  @@ -542,7 +542,7 @@
               projectRow.createData(	\
                   getGeneralSinceDescription(	\
                       project.getModule().getStats().getLastUpdated()))
  -            projectRow.createData(secsToElapsedString(project.getElapsedSecs())) 
  +            projectRow.createData(secsToElapsedTimeString(project.getElapsedSecs())) 
                   
           if not pcount: projectsTable.createLine('None')
           
  @@ -599,7 +599,7 @@
           #
           # ----------------------------------------------------------------------
           #
  -        # diffsLog.xml -- Notes log
  +        # diffsLog.xml -- Server Differences log
           #
           document=XDocDocument('Server Differences',	\
                   self.resolver.getFile(workspace,'diffsLog'))  
  @@ -619,7 +619,7 @@
                   self.insertLink(module,workspace,moduleSection.createParagraph()) 
               
                   # Display the module server links
  -                self.documentServerLinks(moduleSection,module,workspace)   
  +                self.documentServerLinks(moduleSection,module,workspace,getDepthForObject(workspace))
  
                   
               for project in module.getProjects():
                   if not gumpSet.inProjectSequence(project): continue         
  @@ -635,7 +635,7 @@
                   self.insertLink(project,workspace,projectSection.createParagraph())   

               
                   # Display the project server links
  -                self.documentServerLinks(projectSection,project,workspace)      
  +                self.documentServerLinks(projectSection,project,workspace,getDepthForObject(workspace))
     
           
                   dcount+=1
                   
  @@ -664,7 +664,7 @@
               projectRow.createComment(project.getName())          
               self.insertLink(project,workspace,projectRow.createData())     
               self.insertStateIcon(project,workspace,projectRow.createData())    
  -            projectRow.createData(secsToElapsedString(project.getElapsedSecs()))  
  +            projectRow.createData(secsToElapsedTimeString(project.getElapsedSecs()))  
               
               projectRow.createData('%02.2f' % project.getFOGFactor())
                   
  @@ -832,7 +832,7 @@
               self.insertStateIcon(module,workspace,moduleRow.createData())
               self.insertStateIcons(gumpSet,module,workspace,moduleRow.createData())
               
  -            moduleRow.createData(secsToElapsedString(module.getElapsedSecs()))
  +            moduleRow.createData(secsToElapsedTimeString(module.getElapsedSecs()))
               
           if not mcount: modulesTable.createLine('None')
       
  @@ -892,7 +892,7 @@
               self.insertStateIcon(module,workspace,moduleRow.createData())
               self.insertStateIcons(gumpSet,module,workspace,moduleRow.createData())
               
  -            moduleRow.createData(secsToElapsedString(module.getElapsedSecs()))
  +            moduleRow.createData(secsToElapsedTimeString(module.getElapsedSecs()))
               
           if not mcount: modulesTable.createLine('None')
       
  @@ -924,7 +924,7 @@
               self.insertStateIcon(module,workspace,moduleRow.createData())
               self.insertStateIcons(gumpSet,module,workspace,moduleRow.createData())
               
  -            moduleRow.createData(secsToElapsedString(module.getElapsedSecs()))
  +            moduleRow.createData(secsToElapsedTimeString(module.getElapsedSecs()))
               moduleRow.createData('%02.2f' % module.getFOGFactor())
               
           if not mcount: modulesTable.createLine('None')
  @@ -1287,7 +1287,7 @@
                   projectRow.createComment(project.getName())
                   self.insertLink(project,module,projectRow.createData())  
                   self.insertStateIcon(project,module,projectRow.createData())          
             
  -                projectRow.createData(secsToElapsedString(project.getElapsedSecs())) 
  +                projectRow.createData(secsToElapsedTimeString(project.getElapsedSecs()))

   	            
   	        if not pcount: ptodosTable.createLine('None')
   	        
  @@ -1303,7 +1303,7 @@
               projectRow.createComment(project.getName())
               self.insertLink(project,module,projectRow.createData())
               self.insertStateIcon(project,module,projectRow.createData())              
         
  -            projectRow.createData(secsToElapsedString(project.getElapsedSecs())) 
  +            projectRow.createData(secsToElapsedTimeString(project.getElapsedSecs())) 
               
           if not pcount: pallTable.createLine('None')
                              
  @@ -1448,7 +1448,7 @@
           if project.hasCause() and not project==project.getCause():
               self.insertTypedLink(project.getCause(),project,detailsList.createEntry('Root
Cause: '))
               
  -        e = secsToElapsedString(project.getElapsedSecs())
  +        e = secsToElapsedTimeString(project.getElapsedSecs())
           if e and project.isVerboseOrDebug(): detailsList.createEntry("Elapsed: ", e)
                                                         
           # Display nag information
  @@ -1750,7 +1750,7 @@
               # when not string get the object link and <link it...
               noteRow.createData(note.text) 
               
  -    def documentServerLinks(self,xdocNode,linkable,workspace):
  +    def documentServerLinks(self,xdocNode,linkable,workspace,depth=-1):
           
           servers=workspace.getServers()
           if not servers: return    
  @@ -1788,12 +1788,13 @@
                   if statePair:
                       xdocNode.createBreak()
                       # Insert the Icon...
  -                    depth=getDepthForObject(linkable)
  +                    if -1 <> depth:
  +                        depth=getDepthForObject(linkable)
                       self.insertStatePairIconAtDepth(dataNode,statePair,depth)      
                       
                   if utcTime:
                       xdocNode.createBreak()    
  -                    xdocNode.createText('At ' + utcTime)                              
     
  +                    xdocNode.createText(utcTime)                                    
                           
       def documentProperties(self,xdocNode,propertyContainer,title='Properties'):
           
  @@ -1883,7 +1884,7 @@
               workRow.createData(stateDescription(work.state))
               if isinstance(work,TimedWorkItem):      
                   workRow.createData(secsToDate(work.result.start_time))
  -                workRow.createData(secsToElapsedString(work.getElapsedSecs()))
  +                workRow.createData(secsToElapsedTimeString(work.getElapsedSecs()))
               else:
                   workRow.createData('N/A')
                   workRow.createData('N/A')
  @@ -1939,7 +1940,7 @@
                                   
               workList.createEntry("Start Time: ", secsToDate(work.result.start_time))
               workList.createEntry("End Time: ", secsToDate(work.result.end_time))
  -            e = secsToElapsedString(work.getElapsedSecs())
  +            e = secsToElapsedTimeString(work.getElapsedSecs())
               if e : workList.createEntry("Elapsed Time: ", e)
                      
               #
  @@ -2023,7 +2024,7 @@
                           line=o.readline()
                           while line:
                               
  -                            line=wrapLine(line,'...<br/>','    ',100)
  +                            line=wrapLine(line,100,'...<br/>','    ')
                               
                               length = len(line)
                               size += length
  @@ -2053,12 +2054,12 @@
           fileSection=xdocNode.createSection(description)        
           fileTable=fileSection.createTable(['Name','Type','Path'])
           
  -        for file in filelist:
  +        for listedFile in filelist:
               fileRow=fileTable.createRow()
  -            fileRow.createComment(file.getName())            
  -            self.insertLink(file,holder,fileRow.createData())  
  -            fileRow.createData(file.getTypeDescription())
  -            fileRow.createData(file.getPath())
  +            fileRow.createComment(listedFile.getName())            
  +            self.insertLink(listedFile,holder,fileRow.createData())  
  +            fileRow.createData(listedFile.getTypeDescription())
  +            fileRow.createData(listedFile.getPath())
                           
           #
           # Go document the others...
  @@ -2092,13 +2093,13 @@
                   # Change to os.walk once we can move to Python 2.3
                   files=os.listdir(directory)
                   files.sort()
  -                for file in files:
  +                for listedFile in files:
                       
  -                    filePath=os.path.abspath(os.path.join(directory,file))
  +                    filePath=os.path.abspath(os.path.join(directory,listedFile))
                       listingRow=listingTable.createRow()
                       
                       #
  -                    listingRow.createData(file)    
  +                    listingRow.createData(listedFile)    
                       
                       if os.path.isdir(filePath):
                           listingRow.createData('Directory')
  @@ -2123,7 +2124,7 @@
                               line=o.readline()
                               while line:
                               
  -                                line=wrapLine(line,'...<br/>','    ',100)
  +                                line=wrapLine(line,100,'...<br/>','    ')
                               
                                   length = len(line)
                                   size += length
  @@ -2372,15 +2373,15 @@
       
       def documentModulesByElapsed(self,stats,run,workspace,gumpSet):
           fileName='module_elapsed'
  -        file=self.resolver.getFile(stats,fileName)
  -        document=XDocDocument('Modules By Elapsed Time', file)
  +        documentFile=self.resolver.getFile(stats,fileName)
  +        document=XDocDocument('Modules By Elapsed Time', documentFile)
           
           elapsedTable=document.createTable(['Modules By Elapsed'])
           for module in stats.modulesByElapsed:        
               if not gumpSet.inModuleSequence(module): continue
               elapsedRow=elapsedTable.createRow()
               self.insertLink( module, stats, elapsedRow.createData())
  -            elapsedRow.createData(secsToElapsedString(module.getElapsedSecs()))
  +            elapsedRow.createData(secsToElapsedTimeString(module.getElapsedSecs()))
               
           document.serialize()
           
  @@ -2388,8 +2389,8 @@
       
       def documentModulesByProjects(self,stats,run,workspace,gumpSet):
           fileName='module_projects'
  -        file=self.resolver.getFile(stats,fileName)
  -        document=XDocDocument('Modules By Project Count',	file)
  +        documentFile=self.resolver.getFile(stats,fileName)
  +        document=XDocDocument('Modules By Project Count',	documentFile)
           
           mprojsTable=document.createTable(['Modules By Project Count'])
           for module in stats.modulesByProjectCount:         
  @@ -2414,8 +2415,8 @@
        
       def documentModulesByDependencies(self,stats,run,workspace,gumpSet):
           fileName='module_dependencies'
  -        file=self.resolver.getFile(stats,fileName)
  -        document=XDocDocument('Modules By Dependency Count', file)
  +        documentFile=self.resolver.getFile(stats,fileName)
  +        document=XDocDocument('Modules By Dependency Count', documentFile)
           
           dependenciesTable=document.createTable(['Module','Full Dependency Count'])
           for module in stats.modulesByTotalDependencies:         
  @@ -2437,8 +2438,8 @@
        
       def documentModulesByDependees(self,stats,run,workspace,gumpSet):
           fileName='module_dependees'
  -        file=self.resolver.getFile(stats,fileName)    
  -        document=XDocDocument('Modules By Dependee Count', file)
  +        documentFile=self.resolver.getFile(stats,fileName)    
  +        document=XDocDocument('Modules By Dependee Count', documentFile)
           
           dependeesTable=document.createTable(['Module','Full Dependee Count'])
           for module in stats.modulesByTotalDependees:         
  @@ -2459,8 +2460,8 @@
           
       def documentModulesByFOGFactor(self,stats,run,workspace,gumpSet):
           fileName='module_fogfactor'
  -        file=self.resolver.getFile(stats,fileName)    
  -        document=XDocDocument('Modules By FOG Factor',	file)        
  +        documentFile=self.resolver.getFile(stats,fileName)    
  +        document=XDocDocument('Modules By FOG Factor',	documentFile)        
           fogTable=document.createTable(['Module','FOG Factor'])
           for module in stats.modulesByFOGFactor:        
               if not gumpSet.inModuleSequence(module): continue    
  @@ -2474,8 +2475,8 @@
       
       def documentModulesByLastUpdated(self,stats,run,workspace,gumpSet):
           fileName='module_updated'
  -        file=self.resolver.getFile(stats,fileName)    
  -        document=XDocDocument('Modules By Last Updated', file)        
  +        documentFile=self.resolver.getFile(stats,fileName)    
  +        document=XDocDocument('Modules By Last Updated', documentFile)        
           updTable=document.createTable(['Module','Last Updated Date','Last Updated'])
           modules=0
           for module in stats.modulesByLastUpdated:        
  @@ -2495,15 +2496,15 @@
       
       def documentProjectsByElapsed(self,stats,run,workspace,gumpSet):
           fileName='project_elapsed'
  -        file=self.resolver.getFile(stats,fileName)    
  -        document=XDocDocument('Projects By Elapsed Time',	file)
  +        documentFile=self.resolver.getFile(stats,fileName)    
  +        document=XDocDocument('Projects By Elapsed Time',	documentFile)
           
           elapsedTable=document.createTable(['Projects By Elapsed'])
           for project in stats.projectsByElapsed:        
               if not gumpSet.inProjectSequence(project): continue
               elapsedRow=elapsedTable.createRow()
               self.insertLink( project, stats, elapsedRow.createData())
  -            elapsedRow.createData(secsToElapsedString(project.getElapsedSecs()))
  +            elapsedRow.createData(secsToElapsedTimeString(project.getElapsedSecs()))
               
           document.serialize()
           
  @@ -2511,8 +2512,8 @@
        
       def documentProjectsByDependencies(self,stats,run,workspace,gumpSet):
           fileName='project_dependencies'
  -        file=self.resolver.getFile(stats,fileName)    
  -        document=XDocDocument('Projects By Dependency Count',	 file)
  +        documentFile=self.resolver.getFile(stats,fileName)    
  +        document=XDocDocument('Projects By Dependency Count',	 documentFile)
           
           dependenciesTable=document.createTable(['Project','Direct Dependency Count', 'Full
Dependency Count'])
           for project in stats.projectsByTotalDependencies:         
  @@ -2535,8 +2536,8 @@
        
       def documentProjectsByDependees(self,stats,run,workspace,gumpSet):
           fileName='project_dependees'
  -        file=self.resolver.getFile(stats,fileName)    
  -        document=XDocDocument('Projects By Dependee Count', file)
  +        documentFile=self.resolver.getFile(stats,fileName)    
  +        document=XDocDocument('Projects By Dependee Count', documentFile)
           
           dependeesTable=document.createTable(['Project','Direct Dependee Count', 'Full Dependee
Count'])
           for project in stats.projectsByTotalDependees:         
  @@ -2558,8 +2559,8 @@
           
       def documentProjectsByFOGFactor(self,stats,run,workspace,gumpSet):
           fileName='project_fogfactor'
  -        file=self.resolver.getFile(stats,fileName)    
  -        document=XDocDocument('Projects By FOG Factor',	 file)        
  +        documentFile=self.resolver.getFile(stats,fileName)    
  +        document=XDocDocument('Projects By FOG Factor',	 documentFile)        
           fogTable=document.createTable(['Project','Successes','Failures','Preq-Failures','FOG
Factor'])
           for project in stats.projectsByFOGFactor:        
               if not gumpSet.inProjectSequence(project): continue    
  @@ -2579,8 +2580,8 @@
           
       def documentProjectsBySequenceInState(self,stats,run,workspace,gumpSet):
           fileName='project_durstate'
  -        file=self.resolver.getFile(stats,fileName)    
  -        document=XDocDocument('Projects By Duration In State',	file)        
  +        documentFile=self.resolver.getFile(stats,fileName)    
  +        document=XDocDocument('Projects By Duration In State',	documentFile)        
           durTable=document.createTable(['Project','Duration\nIn State','State'])
           for project in stats.projectsBySequenceInState:        
               if not gumpSet.inProjectSequence(project): continue    
  @@ -2674,8 +2675,8 @@
           
       def documentModulesByRepository(self,xref,run,workspace,gumpSet):
           fileName='repo_module'
  -        file=self.resolver.getFile(xref,fileName)        
  -        document=XDocDocument('Modules By Repository',	file)
  +        documentFile=self.resolver.getFile(xref,fileName)        
  +        document=XDocDocument('Modules By Repository',	documentFile)
           
           repoMap=xref.getRepositoryToModuleMap()
           repoList=createOrderedList(repoMap.keys())
  @@ -2701,8 +2702,8 @@
           
       def documentModulesByPackage(self,xref,run,workspace,gumpSet):
           fileName='package_module'
  -        file=self.resolver.getFile(xref,fileName)            
  -        document=XDocDocument('Modules By Package',	file)
  +        documentFile=self.resolver.getFile(xref,fileName)            
  +        document=XDocDocument('Modules By Package',	documentFile)
           
           packageTable=document.createTable(['Modules By Package'])
           
  @@ -2733,8 +2734,8 @@
           
       def documentModulesByDescription(self,xref,run,workspace,gumpSet):
           fileName='description_module'
  -        file=self.resolver.getFile(xref,fileName)            
  -        document=XDocDocument('Modules By Description',	file)
  +        documentFile=self.resolver.getFile(xref,fileName)            
  +        document=XDocDocument('Modules By Description',	documentFile)
           
           descriptionTable=document.createTable(['Modules By Description'])
           
  @@ -2764,8 +2765,8 @@
           
       def documentProjectsByPackage(self,xref,run,workspace,gumpSet):
           fileName='package_project'
  -        file=self.resolver.getFile(xref,fileName)            
  -        document=XDocDocument('Projects By Package',	file)
  +        documentFile=self.resolver.getFile(xref,fileName)            
  +        document=XDocDocument('Projects By Package',	documentFile)
           
           packageTable=document.createTable(['Projects By Package'])
           
  @@ -2795,8 +2796,8 @@
   
       def documentProjectsByDescription(self,xref,run,workspace,gumpSet):
           fileName='description_project'
  -        file=self.resolver.getFile(xref,fileName)            
  -        document=XDocDocument('Projects By Description',	file)
  +        documentFile=self.resolver.getFile(xref,fileName)            
  +        document=XDocDocument('Projects By Description',	documentFile)
           
           descriptionTable=document.createTable(['Projects By Description'])
           
  @@ -2827,8 +2828,8 @@
           
       def documentProjectsByOutput(self,xref,run,workspace,gumpSet):
           fileName='output_project'
  -        file=self.resolver.getFile(xref,fileName)            
  -        document=XDocDocument('Projects By Outputs (e.g. Jars)',	file)
  +        documentFile=self.resolver.getFile(xref,fileName)            
  +        document=XDocDocument('Projects By Outputs (e.g. Jars)',	documentFile)
           
           outputTable=document.createTable(['Projects By Outputs (e.g. Jars)'])
           
  @@ -2858,8 +2859,8 @@
           
       def documentProjectsByOutputId(self,xref,run,workspace,gumpSet):
           fileName='output_id_project'
  -        file=self.resolver.getFile(xref,fileName)            
  -        document=XDocDocument('Projects By Output Identifiers',	file)
  +        documentFile=self.resolver.getFile(xref,fileName)            
  +        document=XDocDocument('Projects By Output Identifiers',	documentFile)
           
           outputTable=document.createTable(['Projects By Output Identifiers'])
           
  @@ -2889,8 +2890,8 @@
           
       def documentProjectsByDescriptorLocation(self,xref,run,workspace,gumpSet):
           fileName='descriptor_project'
  -        file=self.resolver.getFile(xref,fileName)            
  -        document=XDocDocument('Projects By Descriptor Location',	file)
  +        documentFile=self.resolver.getFile(xref,fileName)            
  +        document=XDocDocument('Projects By Descriptor Location',	documentFile)
           
           descLocnTable=document.createTable(['Projects By Descriptor Location'])
           
  
  
  
  1.2       +2 -2      gump/python/header.txt
  
  Index: header.txt
  ===================================================================
  RCS file: /home/cvs/gump/python/header.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- header.txt	6 Apr 2004 15:57:11 -0000	1.1
  +++ header.txt	12 Apr 2004 18:57:37 -0000	1.2
  @@ -1,4 +1,4 @@
  -#!/usr/bin/python
  +#!/usr/bin/env python
   
   # Copyright 2003-2004 The Apache Software Foundation
   #
  
  
  
  1.21      +3 -1      gump/project/depot.xml
  
  Index: depot.xml
  ===================================================================
  RCS file: /home/cvs/gump/project/depot.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- depot.xml	8 Apr 2004 07:07:18 -0000	1.20
  +++ depot.xml	12 Apr 2004 18:57:37 -0000	1.21
  @@ -60,7 +60,9 @@
           <depend project="xml-xerces"/>
           <depend project="ant-testutil"/>
           <depend project="junit"/>
  -
  +        
  +        <junitreport nested="common/target/tests"/>
  +        
           <ant basedir="common" buildfile="build.xml" target="test" vm="1.4">
           	<property name="ant.home" project="ant" reference="home" />
           </ant>
  
  
  

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


Mime
View raw message