ajack 2003/09/04 22:20:42
Modified: python/gump update.py model.py context.py build.py check.py
document.py conf.py
Log:
XML Escaping output before coping into xdocs
Revision Changes Path
1.8 +4 -4 jakarta-gump/python/gump/update.py
Index: update.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/update.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- update.py 29 Aug 2003 00:20:22 -0000 1.7
+++ update.py 5 Sep 2003 05:20:42 -0000 1.8
@@ -177,7 +177,7 @@
# Execute the command and capture results
# Testing...
- cmdResult=execute(cmd)
+ cmdResult=execute(cmd,workspace.tmpdir)
#cmdResult=dummyExecute(cmd)
work=CommandWorkItem(WORK_TYPE_UPDATE,cmd,cmdResult)
1.14 +10 -3 jakarta-gump/python/gump/model.py
Index: model.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/model.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- model.py 29 Aug 2003 00:20:22 -0000 1.13
+++ model.py 5 Sep 2003 05:20:42 -0000 1.14
@@ -123,8 +123,15 @@
if not self['banner-image']:
self['banner-image']=default.bannerimage
if not self['banner-link']: self['banner-link']="http://jakarta.apache.org"
+ if not self.tmpdir: self.logdir=os.path.join(self.basedir,"tmp")
+ if not os.path.exists(self.tmpdir): os.mkdir(self.tmpdir)
+
if not self.logdir: self.logdir=os.path.join(self.basedir,"log")
+ if not os.path.exists(self.logdir): os.mkdir(self.logdir)
+
if not self.cvsdir: self.cvsdir=os.path.join(self.basedir,"cvs")
+ if not os.path.exists(self.cvsdir): os.mkdir(self.cvsdir)
+
if not self.pkgdir: self.pkgdir=self.basedir
if self.deliver:
if not self.scratchdir: self.scratchdir=os.path.join(self.basedir,"scratch")
1.2 +1 -1 jakarta-gump/python/gump/context.py
Index: context.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/context.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- context.py 29 Aug 2003 00:20:22 -0000 1.1
+++ context.py 5 Sep 2003 05:20:42 -0000 1.2
@@ -147,7 +147,7 @@
WORK_TYPE_BUILD=5
WORK_TYPE_DOCUMENT=6
-workTypeDescriptions = { WORK_TYPE_CHECK : "Check Environment",
+workTypeDescriptions = { WORK_TYPE_CHECK : "CheckEnvironment",
WORK_TYPE_CONFIG : "Config",
WORK_TYPE_UPDATE : "Update",
WORK_TYPE_SYNC : "Synchronize",
1.9 +5 -5 jakarta-gump/python/gump/build.py
Index: build.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/build.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- build.py 29 Aug 2003 00:20:22 -0000 1.8
+++ build.py 5 Sep 2003 05:20:42 -0000 1.9
@@ -170,7 +170,7 @@
log.debug(' ------ Sync\'ing : '+ module.name)
# Perform the Sync
- cmdResult=execute(cmd)
+ cmdResult=execute(cmd,workspace.tmpdir)
work=CommandWorkItem(WORK_TYPE_SYNC,cmd,cmdResult)
mctxt.performedWork(work)
@@ -207,7 +207,7 @@
if cmd:
# Execute the command ....
- cmdResult=execute(cmd)
+ cmdResult=execute(cmd,workspace.tmpdir)
# Update Context
work=CommandWorkItem(WORK_TYPE_BUILD,cmd,cmdResult)
1.13 +4 -4 jakarta-gump/python/gump/check.py
Index: check.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/check.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- check.py 29 Aug 2003 00:20:22 -0000 1.12
+++ check.py 5 Sep 2003 05:20:42 -0000 1.13
@@ -147,7 +147,7 @@
# Need to check javac classes are on CLASSPATH
#
-def checkExecutable(workspace, context, command,options,mandatory):
+def checkExecutable(workspace,context,command,options,mandatory):
ok=0
try:
cmd=getCmdFromString(command+" "+options,'check_'+command)
1.4 +26 -7 jakarta-gump/python/gump/document.py
Index: document.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/document.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- document.py 5 Sep 2003 04:52:13 -0000 1.3
+++ document.py 5 Sep 2003 05:20:42 -0000 1.4
@@ -68,6 +68,7 @@
import sys
import logging
from string import lower
+from xml.sax.saxutils import escape
from gump import log, gumpSafeName
from gump.conf import *
@@ -136,12 +137,24 @@
documentStatistics(workspace,context,db,moduleFilterList,projectFilterList)
#documentXRef(workspace,context)
- forrest=Cmd('forrest','forrest',dir.docs)
+
+ content=getContentDir(workspace)
+ xdocs=getWorkspaceDir(workspace,content)
+ forrest=Cmd('forrest','forrest',content)
forrest.addPrefixedParameter('-D','java.awt.headless','true','=')
+ forrest.addPrefixedParameter('-D','project.content-dir', \
+ content, '=')
forrest.addPrefixedParameter('-D','project.xdocs-dir', \
- getWorkspaceDir(workspace), '=')
- forrest.addPrefixedParameter('-D','project.site-dir', \
- getWorkspaceSiteDir(workspace), '=' )
+ xdocs, '=')
+ #forrest.addPrefixedParameter('-D','project.sitemap-dir', \
+ # docroot, '=')
+ #forrest.addPrefixedParameter('-D','project.stylesheets-dir', \
+ # docroot, '=')
+ #forrest.addPrefixedParameter('-D','project.images-dir', \
+ # docroot, '=')
+
+ #forrest.addPrefixedParameter('-D','project.skinconf', \
+ # getWorkspaceSiteDir(workspace), '=' )
forrestResult=execute(forrest)
# Update Context
@@ -449,7 +462,7 @@
o=open(output, 'r')
line=o.readline()
while line:
- x.write(line)
+ x.write(escape(line))
line=o.readline()
finally:
if o: o.close()
@@ -606,8 +619,14 @@
if not os.path.exists(sdir): os.mkdir(sdir)
return sdir
-def getWorkspaceDir(workspace):
- xdir=os.path.normpath(os.path.join(workspace.logdir,'xdocs'))
+def getContentDir(workspace):
+ cdir=os.path.normpath(os.path.join(workspace.logdir,'content'))
+ if not os.path.exists(cdir): os.mkdir(cdir)
+ return xdir
+
+def getWorkspaceDir(workspace,contentdir=None):
+ cdir = contentdir or getContentDir(workspace)
+ xdir=os.path.normpath(os.path.join(getContentDir(workspace),'xdocs'))
if not os.path.exists(xdir): os.mkdir(xdir)
return xdir
1.9 +3 -5 jakarta-gump/python/gump/conf.py
Index: conf.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/conf.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- conf.py 29 Aug 2003 00:20:22 -0000 1.8
+++ conf.py 5 Sep 2003 05:20:42 -0000 1.9
@@ -82,7 +82,6 @@
cache = os.path.normpath('%s/%s' % (base,'cache'))
work = os.path.normpath('%s/%s' % (base,'work'))
tmp = os.path.normpath('%s/%s' % (base,'tmp'))
- docs = os.path.normpath('%s/%s' % (base,'docs'))
class default:
"""Configuration of default settings"""
@@ -108,7 +107,6 @@
if not os.path.exists(dir.cache): os.mkdir(dir.cache)
if not os.path.exists(dir.work): os.mkdir(dir.work)
if not os.path.exists(dir.tmp): os.mkdir(dir.tmp)
- if not os.path.exists(dir.docs): os.mkdir(dir.docs)
if dir.base not in sys.path: sys.path.insert(0, dir.base)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]