Return-Path: Mailing-List: contact gump-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list gump@jakarta.apache.org Received: (qmail 42623 invoked by uid 500); 10 Sep 2003 14:25:04 -0000 Received: (qmail 42618 invoked from network); 10 Sep 2003 14:25:03 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 10 Sep 2003 14:25:03 -0000 Received: (qmail 67287 invoked by uid 1728); 10 Sep 2003 14:25:08 -0000 Date: 10 Sep 2003 14:25:08 -0000 Message-ID: <20030910142508.67286.qmail@minotaur.apache.org> From: ajack@apache.org To: jakarta-gump-cvs@apache.org Subject: cvs commit: jakarta-gump/python/gump launcher.py document.py X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 """ + \ - "" + context.projectexpression + "" + "[" + context.projectexpression + "]." note+="\n\nRequested Projects:\n" for project in context.gumpset.projects: @@ -296,20 +296,23 @@ endSectionXDoc(x) x.write('

Context Tree: context

') + x.write('

Workspace Config: XML

') x.write('

RSS : News Feed

') 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(' ' % (project.name)) x.write(' %s%s' % (project.name, project.home)) x.write(' ') endTableXDoc(x) - endSectionXDoc(x) + else: + x.write('

No packaged projects installed.

') + 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('

Module Config : XML

') + 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('\n') +# xf=StringIO.StringIO() +# xml = xmlize('module',module,xf) +# x.write(escape(xml)) +# x.write('\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('

Project Config : XML

' \ +# % (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('\n') +# xf=StringIO.StringIO() +# xml = xmlize('project',project,xf) +# x.write(escape(xml)) +# x.write('\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