gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump launcher.py build.py utils.py document.py
Date Sat, 27 Sep 2003 14:36:18 GMT
ajack       2003/09/27 07:36:18

  Modified:    python/gump launcher.py build.py utils.py document.py
  Log:
  1) Playing w/ time format (out make smarter)
  2) Better debugging for CWD failures
  3) Added "start_time" to work documentation
  
  Revision  Changes    Path
  1.7       +10 -4     jakarta-gump/python/gump/launcher.py
  
  Index: launcher.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/launcher.py,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- launcher.py	27 Sep 2003 14:16:27 -0000	1.6
  +++ launcher.py	27 Sep 2003 14:36:18 -0000	1.7
  @@ -277,11 +277,17 @@
       start_time=time.time()
       try:
         try:          
  -        # Make the CWED if needed
  +        # Make the CWD if needed
           if cmd.cwd: 
  -          cwdpath=os.path.abspath(cmd.cwd)
  -          if not os.path.exists(cwdpath): os.mkdir(cwdpath)
  -          os.chdir(cwdpath)
  +          try:
  +              cwdpath=os.path.abspath(cmd.cwd)
  +              if not os.path.exists(cwdpath): os.mkdir(cwdpath)
  +              os.chdir(cwdpath)
  +          except Exception, details :
  +              # Log the problem and re-raise
  +              log.error('Failed to create CWD. Details: ' + str(details))
  +              raise
  +        
           
           # The command line
           execString=cmd.formatCommandLine()        
  
  
  
  1.17      +4 -5      jakarta-gump/python/gump/build.py
  
  Index: build.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/build.py,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- build.py	27 Sep 2003 05:35:05 -0000	1.16
  +++ build.py	27 Sep 2003 14:36:18 -0000	1.17
  @@ -164,8 +164,7 @@
           else:
               mctxt.status=STATUS_SUCCESS
       else:
  -        # :TODO: Is the redundanct, ought it not have already be published?
  -        # Does this account for the confusion?
  +        # :TODO: Is this redundant, ought it not have already be published?
           mctxt.propagateErrorState(mctxt.status,mctxt.reason)
   
   def buildProjects( workspace, sequence, context=GumpContext() ):
  
  
  
  1.4       +3 -2      jakarta-gump/python/gump/utils.py
  
  Index: utils.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/utils.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- utils.py	25 Sep 2003 19:33:49 -0000	1.3
  +++ utils.py	27 Sep 2003 14:36:18 -0000	1.4
  @@ -188,10 +188,11 @@
       return (hours, mins, secs)
       
   def secsToString(secs):
  -    return ('%02d:%02d:%02d' % secsToElapsedTime(secs))           
  +    return elapsedTimeToString(secsToElapsedTime(secs))           
       
   def elapsedTimeToString(elapsed):
  -    return ('%02d:%02d:%02d' % elapsed)           
  +    #:TODO: Don't show hours if 0, show mins/secs words
  +    return ('%02d:%02d:%02d' % elapsed)        
       
   if __name__=='__main__':
   
  
  
  
  1.44      +3 -2      jakarta-gump/python/gump/document.py
  
  Index: document.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- document.py	26 Sep 2003 20:35:21 -0000	1.43
  +++ document.py	27 Sep 2003 14:36:18 -0000	1.44
  @@ -553,12 +553,13 @@
       if not worklist: return
       startSectionXDoc(x,description)
       x.write('    <table>\n')
  -    x.write('      <tr><th>Name</th><th>Type</th><th>State</th><th>Elapsed
Time</th></tr>')
  +    x.write('      <tr><th>Name</th><th>Type</th><th>State</th><th>Start
Time</th><th>Elapsed Time</th></tr>')
       for work in worklist:
           x.write('     <tr><!-- %s -->' % (workTypeName(work.type)))       
           x.write('      <td><link href=\'%s\'>%s</link></td>' %
(getWorkRelativeUrl(work.type,work.command.name),work.command.name))    
           x.write('      <td>%s</td>' % (workTypeName(work.type))) 
  -        x.write('      <td>%s</td><td>%s</td>' % (stateName(work.status),
secsToString(work.secs)))    
  +        x.write('      <td>%s</td><td>%s</td><td>%s</td>'
\
  +            % (stateName(work.status), str(work.start_time), secsToString(work.secs)))
   
           x.write('     </tr>')
       x.write('    </table>\n')
       endSectionXDoc(x)
  
  
  

Mime
View raw message