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 document.py
Date Wed, 10 Sep 2003 14:25:08 GMT
ajack       2003/09/10 07:25:08

  Modified:    python/gump launcher.py document.py
  Log:
  Adding more "dump the gen'd tree" type code tto try to debug why packages are being missed
on some workspaces.
  I tried writting the XML our escaped to an xdoc, but that croaked on non-ASCII characters
in one committers name.
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-gump/python/gump/launcher.py
  
  Index: launcher.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/launcher.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- launcher.py	29 Aug 2003 00:20:22 -0000	1.1
  +++ launcher.py	10 Sep 2003 14:25:07 -0000	1.2
  @@ -311,10 +311,10 @@
           # Process Outputs (exit_code and stderr/stdout)
           if result.exit_code < 0:
             result.status=CMD_STATUS_TIMED_OUT
  -          log.error('Failed to launch command. ExitCode: ' + str(result.exit_code))
  +          log.error('Failed to launch/execute command. ExitCode: ' + str(result.exit_code))
           elif result.exit_code > 0:    
             result.status=CMD_STATUS_FAILED
  -          log.error('Failed to launch command. ExitCode: ' + str(result.exit_code))
  +          log.error('Failed to launch/execute command. ExitCode: ' + str(result.exit_code))
           else:
             result.status=CMD_STATUS_SUCCESS
             
  
  
  
  1.16      +65 -7     jakarta-gump/python/gump/document.py
  
  Index: document.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- document.py	10 Sep 2003 00:03:46 -0000	1.15
  +++ document.py	10 Sep 2003 14:25:08 -0000	1.16
  @@ -132,7 +132,7 @@
       seedForrest(workspace,context)
       
       # Testing...
  -    documentText(workspace,context,moduleFilterList,projectFilterList)
  +    #documentText(workspace,context,moduleFilterList,projectFilterList)
       
       db=StatisticsDB()
     
  @@ -248,7 +248,7 @@
           note="""This output does not represent the a complete workspace,
           but a partial one.         
           Only projects, and their dependents, matching this regular expression """ + \
  -            "<strong>" + context.projectexpression + "</strong>"
  +            "<strong>[" + context.projectexpression + "]</strong>."
           
           note+="\n\nRequested Projects:\n"
           for project in context.gumpset.projects:
  @@ -296,20 +296,23 @@
       endSectionXDoc(x)       
       
       x.write('<p><strong>Context Tree:</strong> <link href=\'context.html\'>context</link></p>')
  +    x.write('<p><strong>Workspace Config:</strong> <link href=\'xml.txt\'>XML</link></p>')
       x.write('<p><strong>RSS :</strong> <link href=\'index.rss\'>News
Feed</link></p>')
       
       documentWorkList(x,workspace,context.worklist,'Workspace-level Work',wdir)
        
  +    startSectionXDoc(x,'Packaged Projects')
       packages=getPackagedProjects()
       if packages:
  -        startSectionXDoc(x,'Packaged Projects')
           startTableXDoc(x)
           for project in packages:
               x.write('     <tr><!-- %s -->' % (project.name))        
               x.write('      <td>%s</td><td>%s</td>' % (project.name,
project.home))    
               x.write('     </tr>')
           endTableXDoc(x)
  -        endSectionXDoc(x)
  +    else:
  +        x.write('<p><strong>No packaged projects installed.</strong></p>')
  
  +    endSectionXDoc(x)
         
       footerXDoc(x)
       endXDoc(x)
  @@ -334,6 +337,13 @@
       footerXDoc(x)
       endXDoc(x)
           
  +    # Document the workspace XML
  +    
  +    f=open(getWorkspaceXMLAsTextDocument(workspace), 'w')
  +    xml = xmlize('workspace',workspace,f)
  +    f.close()  
  +    
  +        
   def documentModule(workspace,wdir,modulename,modulecontext,db,projectFilterList=None):
       mdir=getModuleDir(workspace,modulename,wdir)
       
  @@ -379,6 +389,8 @@
       endListXDoc(x)
       endSectionXDoc(x)
          
  +#   x.write('<p><strong>Module Config :</strong> <link href=\'xml.html\'>XML</link></p>')
  +    
       documentWorkList(x,workspace,modulecontext.worklist,'Module-level Work',mdir)
       
       footerXDoc(x)
  @@ -389,6 +401,17 @@
           if projectFilterList and not pctxt.project in projectFilterList: continue     

           documentProject(workspace,modulename,mdir,pctxt.name,pctxt,db)
      
  +    # Document the module XML
  +#    x=startXDoc(getModuleXMLDocument(workspace,modulename,mdir))
  +#    headerXDoc(x,'Module XML')    
  +#    x.write('<source>\n')
  +#    xf=StringIO.StringIO()
  +#    xml = xmlize('module',module,xf)
  +#    x.write(escape(xml))    
  +#    x.write('</source>\n')   
  +#    footerXDoc(x)
  +#    endXDoc(x)
  +    
   def documentProject(workspace,modulename,mdir,projectname,projectcontext,db): 
       module=Module.list[modulename]
       project=Project.list[projectname]
  @@ -457,10 +480,25 @@
             addItemXDoc(x,option.name)
           endListXDoc(x)
           endSectionXDoc(x)
  -                      
  +                  
  +       
  +#    x.write('<p><strong>Project Config :</strong> <link href=\'%s\'>XML</link></p>'
\
  +#                % (getModuleProjectRelativeUrl(modulename,projectcontext.name)) )
  +        
       documentWorkList(x,workspace,projectcontext.worklist,'Project-level Work',mdir)
       footerXDoc(x)
  -    endXDoc(x)
  +    endXDoc(x)    
  +    
  +    # Document the project XML
  +#    x=startXDoc(getProjectXMLDocument(workspace,modulename,projectcontext.name))
  +#    headerXDoc(x,'Project XML')    
  +#    x.write('<source>\n')
  +#    xf=StringIO.StringIO()
  +#    xml = xmlize('project',project,xf)
  +#    x.write(escape(xml))    
  +#    x.write('</source>\n')   
  +#    footerXDoc(x)
  +#    endXDoc(x)
   
   def documentAnnotations(x,annotations):
       if not annotations: return
  @@ -795,6 +833,13 @@
       if not workspacedir: workspacedir = getWorkspaceDir(workspace)    
       return os.path.join(workspacedir,'context.xml')
       
  +    
  +# Couldn't cope w/ log4j nagger's name characterset, so bailed
  +# and went to text...
  +def getWorkspaceXMLAsTextDocument(workspace,contentdir=None):
  +    if not contentdir: contentdir = getContentDir(workspace)    
  +    return os.path.join(contentdir,'xml.txt')
  +    
   def getStatisticsDocument(workspace,statsdir=None):
       if not statsdir: statsdir = getStatisticsDir(workspace)    
       return os.path.join(statsdir,'index.xml')
  @@ -808,10 +853,20 @@
       if not moduledir: moduledir=getModuleDir(workspace, modulename)
       return os.path.join(moduledir,'index.xml')
   
  +def getModuleXMLDocument(workspace, modulename,moduledir=None):
  +    mdir=gumpSafeName(modulename)
  +    if not moduledir: moduledir=getModuleDir(workspace, modulename)
  +    return os.path.join(moduledir,'xml.xml')
  +
   def getProjectDocument(workspace,modulename,projectname,moduledir=None):
       pname=gumpSafeName(projectname)
       if not moduledir: moduledir=getModuleDir(workspace, modulename)
       return os.path.join(moduledir,pname+'.xml')
  +    
  +def getProjectXMLDocument(workspace,modulename,projectname,moduledir=None):
  +    pname=gumpSafeName(projectname)
  +    if not moduledir: moduledir=getModuleDir(workspace, modulename)
  +    return os.path.join(moduledir,pname+'_xml.xml')
   
   def getWorkDocument(rootdir,name,type,wdir=None):
       wname=gumpSafeName(name)
  @@ -851,6 +906,9 @@
   def getModuleProjectRelativeUrl(mname,pname,depth=0):
       return getUp(depth)+gumpSafeName(mname)+'/'+gumpSafeName(pname)+'.html'
       
  +def getModuleProjectXMLRelativeUrl(mname,pname,depth=0):
  +    return getUp(depth)+gumpSafeName(mname)+'/'+gumpSafeName(pname)+'_xml.html'
  +    
   def getModuleProjectRelativeUrlFromModule(mname,pname):
       return getProjectRelativeUrl(mname,pname,1)
   
  @@ -864,7 +922,7 @@
   def getUp(depth):
       url=''
       i = 0
  -    while i < depth:
  +    while i < int(depth):
           url+='../'
           i += 1
       return url
  
  
  

Mime
View raw message