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 context.py document.py
Date Fri, 17 Oct 2003 20:57:15 GMT
ajack       2003/10/17 13:57:15

  Modified:    python/gump context.py document.py
  Log:
  1) Was over escaping
  2) See if we can 'tail' failed operations
  
  Revision  Changes    Path
  1.20      +3 -0      jakarta-gump/python/gump/context.py
  
  Index: context.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/context.py,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- context.py	16 Oct 2003 20:07:42 -0000	1.19
  +++ context.py	17 Oct 2003 20:57:15 -0000	1.20
  @@ -205,6 +205,9 @@
               overview+=self.result.tail(50)
               
           return overview
  +        
  +    def tail(self,lines=50):
  +        return self.result.tail(lines)
               
   class WorkList(list):
       """List of work (in order)"""
  
  
  
  1.81      +30 -2     jakarta-gump/python/gump/document.py
  
  Index: document.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- document.py	17 Oct 2003 19:04:12 -0000	1.80
  +++ document.py	17 Oct 2003 20:57:15 -0000	1.81
  @@ -648,7 +648,7 @@
       addItemXDoc(x,"Status: ", stateName(projectcontext.status))  
       if not projectcontext.reason == REASON_UNSET:
           addItemXDoc(x,"Reason: " + reasonString(projectcontext.reason))
  -    addItemXDoc(x,"Module: ", getContextLink(projectcontext.parent))
  +    addXItemXDoc(x,"Module: ", getContextLink(projectcontext.parent))
       if projectcontext.cause and not projectcontext==projectcontext.cause:
           addItemXDoc(x,"Root Cause: ", getTypedContextLink(projectcontext.cause))
       addItemXDoc(x,"Elapsed: ", str(projectcontext.elapsedSecs()))
  @@ -745,11 +745,13 @@
   def documentWorkList(x,workspace,worklist,description='Work',dir='.'):
       if not worklist: return
       startSectionXDoc(x,description)
  +    
       x.write('    <table>\n')
       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><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><td>%s</td>'
\
               % ( stateName(work.status), \
  @@ -758,6 +760,32 @@
                   secsToString(work.secs)))    
           x.write('     </tr>')
       x.write('    </table>\n')
  +    
  +    #
  +    # Do a tail on work that failed...
  +    #
  +    shown=0
  +    for work in worklist:
  +        if isinstance(work,CommandWorkItem):      
  +            if not STATUS_SUCCESS == work.status:
  +                tail=work.tail()
  +                if tail:
  +                    #
  +                    # Write the header once only...
  +                    #
  +                    if not shown:
  +                        shown=1
  +                        x.write('    <table>\n')
  +                    
  +                    #
  +                    # Write out the 'tail'
  +                    #
  +                    x.write('<tr><td><strong>Name:</strong> %s</td></tr><tr><td>%s</td></tr>'
%
  +                            ( workTypeName(work.type), tail ) )
  +   
  +    if shown:
  +        x.write('    </table>\n')
  +            
       endSectionXDoc(x)
       
       for work in worklist:
  
  
  

Mime
View raw message