You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/07/02 16:25:31 UTC
cvs commit: gump/python/gump/document/xdocs xdoc.py documenter.py
ajack 2004/07/02 07:25:31
Modified: python/gump/model Tag: CleanUp project.py object.py
module.py workspace.py profile.py
python/gump/document/xdocs Tag: CleanUp xdoc.py
documenter.py
Log:
Try to be cleaner w/ when xdocs-work (XHTML) and when xdocs-work/content (XDOCS).
Revision Changes Path
No revision
No revision
1.85.2.15 +0 -3 gump/python/gump/model/project.py
Index: project.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/project.py,v
retrieving revision 1.85.2.14
retrieving revision 1.85.2.15
diff -u -r1.85.2.14 -r1.85.2.15
--- project.py 1 Jul 2004 00:59:17 -0000 1.85.2.14
+++ project.py 2 Jul 2004 14:25:31 -0000 1.85.2.15
@@ -267,8 +267,6 @@
# provide elements when not defined in xml
def complete(self,workspace):
- log.info('Complete ' + `self`)
-
if self.isComplete(): return
if not self.inModule():
@@ -505,7 +503,6 @@
# Done, don't redo
self.setComplete(True)
- log.info('Complete ' + `self`)
def importDependencies(self,workspace):
badDepends=[]
1.24.2.13 +0 -1 gump/python/gump/model/object.py
Index: object.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/object.py,v
retrieving revision 1.24.2.12
retrieving revision 1.24.2.13
diff -u -r1.24.2.12 -r1.24.2.13
--- object.py 29 Jun 2004 20:52:02 -0000 1.24.2.12
+++ object.py 2 Jul 2004 14:25:31 -0000 1.24.2.13
@@ -253,7 +253,6 @@
self.spliced=spliced
def splice(self,dom):
- log.info('Splice ' + `self`)
if self.isComplete():
raise RuntimeError, "Can't splice a completed entity: " + `self`
spliceDom(self.element,dom)
1.45.2.10 +2 -8 gump/python/gump/model/module.py
Index: module.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/module.py,v
retrieving revision 1.45.2.9
retrieving revision 1.45.2.10
diff -u -r1.45.2.9 -r1.45.2.10
--- module.py 28 Jun 2004 21:17:00 -0000 1.45.2.9
+++ module.py 2 Jul 2004 14:25:31 -0000 1.45.2.10
@@ -225,8 +225,6 @@
if self.isResolved(): return
- log.info('Resolve ' + `self`)
-
owner=self.getOwner()
for pdom in self.getDomChildIterator('project'):
@@ -248,17 +246,13 @@
project.splice(pdom)
else:
project=Project(name,pdom,self)
- self.addProject(project)
-
- log.info('Resolved ' + `self`)
+ self.addProject(project)
self.setResolved()
# provide default elements when not defined in xml
def complete(self,workspace):
-
- log.info('Complete ' + `self`)
-
+
if self.isComplete(): return
# :TODO: hacky
1.51.2.14 +0 -6 gump/python/gump/model/workspace.py
Index: workspace.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/workspace.py,v
retrieving revision 1.51.2.13
retrieving revision 1.51.2.14
diff -u -r1.51.2.13 -r1.51.2.14
--- workspace.py 30 Jun 2004 18:41:58 -0000 1.51.2.13
+++ workspace.py 2 Jul 2004 14:25:31 -0000 1.51.2.14
@@ -244,8 +244,6 @@
def complete(self):
if self.isComplete(): return
-
- log.info('Complete ' + `self`)
# Set defaults...
self.basedir=''
@@ -553,8 +551,6 @@
"""
if self.isResolved(): return
- log.info('Resolve ' + `self`)
-
for pdom in self.getDomChildIterator('project'):
if hasDomAttribute(pdom,'name'):
name=getDomAttributeValue(pdom,'name')
@@ -565,8 +561,6 @@
else:
project=Project(name,pdom,self)
self.addProject(project)
-
- log.info('Resolved ' + `self`)
self.setResolved()
1.5.2.4 +0 -2 gump/python/gump/model/profile.py
Index: profile.py
===================================================================
RCS file: /home/cvs/gump/python/gump/model/profile.py,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -r1.5.2.3 -r1.5.2.4
--- profile.py 25 Jun 2004 23:08:52 -0000 1.5.2.3
+++ profile.py 2 Jul 2004 14:25:31 -0000 1.5.2.4
@@ -39,8 +39,6 @@
def resolve(self):
- log.info('Resolve ' + `self`)
-
owner=self.getOwner()
for pdom in self.getDomChildIterator('project'):
No revision
No revision
1.2.2.16 +1 -3 gump/python/gump/document/xdocs/xdoc.py
Index: xdoc.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/xdocs/xdoc.py,v
retrieving revision 1.2.2.15
retrieving revision 1.2.2.16
diff -u -r1.2.2.15 -r1.2.2.16
--- xdoc.py 30 Jun 2004 14:49:33 -0000 1.2.2.15
+++ xdoc.py 2 Jul 2004 14:25:31 -0000 1.2.2.16
@@ -781,9 +781,7 @@
from gump.core.config import default
self.context.writeLine('<p align="right">Last Updated: %s</p>' % default.datetime)
self.context.writeLine('</html>')
- self.close()
-
- log.debug('Closed Document.')
+ self.close()
def createSection(self,title,transient=False):
return self.storePiece(XDocSection(self.createSubContext(transient),self.config,title))
1.9.2.30 +37 -29 gump/python/gump/document/xdocs/documenter.py
Index: documenter.py
===================================================================
RCS file: /home/cvs/gump/python/gump/document/xdocs/documenter.py,v
retrieving revision 1.9.2.29
retrieving revision 1.9.2.30
diff -u -r1.9.2.29 -r1.9.2.30
--- documenter.py 30 Jun 2004 15:43:31 -0000 1.9.2.29
+++ documenter.py 2 Jul 2004 14:25:31 -0000 1.9.2.30
@@ -119,8 +119,35 @@
#
# XDocing...
def getXDocWorkDirectory(self):
- fdir=os.path.abspath(os.path.join(self.workspace.getBaseDirectory(),'xdocs-work'))
- return fdir
+ if hasattr(self,'workDir'): return self.workDir
+
+ wdir=os.path.abspath(os.path.join(
+ self.workspace.getBaseDirectory(),'xdocs-work'))
+
+ if self.config.isXdocs():
+ wdir=os.path.abspath(os.path.join(wdir,'content'))
+
+ if not os.path.exists(wdir):
+ os.makedirs(wdir)
+
+ self.workDir=wdir
+
+ return self.workDir
+
+ def getXDocLogDirectory(self):
+ if hasattr(self,'logDir'): return self.logDir
+
+ ldir=self.workspace.getLogDirectory()
+
+ if self.config.isXdocs():
+ ldir=os.path.abspath(os.path.join(ldir,'content'))
+
+ if not os.path.exists(ldir):
+ os.makedirs(ldir)
+
+ self.logDir=ldir
+
+ return self.logDir
def getXDocTemplateDirectory(self):
""" Template (XDoc skin/config) """
@@ -144,11 +171,10 @@
Copy the main template (perhaps with site tweaks) to prepare
"""
- log.info('Prepare XDoc work with template')
+ log.info('Prepare XDoc work with template')
+ xdocLogDir=self.getXDocLogDirectory()
- #
# First deleted the work tree (if exists), then ensure created
- #
xdocWorkDir=self.getXDocWorkDirectory()
wipeDirectoryTree(xdocWorkDir)
@@ -175,15 +201,7 @@
# The move contents/xdocs from work directory to log
xdocWorkDir=self.getXDocWorkDirectory()
- logDirectory=self.workspace.getLogDirectory()
-
- if self.config.isXdocs():
- # .. but only the stuff under 'content', so as not to
- # break the webapp.
- xdocWorkDir=os.path.abspath(
- os.path.join(xdocWorkDir,'content'))
- logDirectory=os.path.abspath(
- os.path.join(logDirectory,'content'))
+ logDirectory=self.getXDocLogDirectory()
workContents=os.path.abspath(
os.path.join(xdocWorkDir,objDir))
@@ -206,14 +224,14 @@
logSpec=self.resolver.getFileSpec(self.workspace, 'buildLog')
xdocWorkDir=self.getXDocWorkDirectory()
- logDirectory=self.workspace.getLogDirectory()
-
+ logDirectory=self.getXDocLogDirectory()
+
# Current status
logSource=os.path.abspath(
os.path.join(xdocWorkDir,logSpec.getDocument()))
logTarget=os.path.abspath(
os.path.join(logDirectory,logSpec.getDocument()))
-
+
# Do the transfer..
success=True
try:
@@ -227,19 +245,9 @@
def syncXDocs(self):
-
# The move contents/xdocs from work directory to log
xdocWorkDir=self.getXDocWorkDirectory()
- logDirectory=self.workspace.getLogDirectory()
-
- if self.config.isXdocs():
- # .. but only the stuff under 'content', so as not to
- # break the webapp.
- workContents=os.path.abspath(os.path.join(xdocWorkDir,'content'))
- logContents=os.path.abspath(os.path.join(logDirectory,'content'))
- else:
- workContents=xdocWorkDir
- logContents=logDirectory
+ logDirectory=self.getXDocLogDirectory()
log.info('Syncronize work->log, and clean-up...')
@@ -248,7 +256,7 @@
#
# Sync over public pages...
#
- syncDirectories(workContents,logContents)
+ syncDirectories(xdocWorkDir,logDirectory)
cleanUp=True
if cleanUp:
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org