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/02/10 21:18:40 UTC
cvs commit: jakarta-gump/python/gump/utils owner.py
ajack 2004/02/10 12:18:40
Modified: python/gump/syndication syndicator.py
python/gump/model object.py project.py
python/gump/document documenter.py xdoc.py forrest.py
python/gump/utils owner.py
Log:
Gob fulls of minor tweaks.
Revision Changes Path
1.18 +5 -5 jakarta-gump/python/gump/syndication/syndicator.py
Index: syndicator.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/syndication/syndicator.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- syndicator.py 23 Jan 2004 23:32:27 -0000 1.17
+++ syndicator.py 10 Feb 2004 20:18:40 -0000 1.18
@@ -80,10 +80,10 @@
#
def syndicate(self,run):
if not hasattr(self,'syndicateRun'):
- raise RuntimeException, 'Complete [' + self.__class__ + '] with syndicateRun(self,run)'
+ raise RuntimeException, 'Complete [' + `self.__class__` + '] with syndicateRun(self,run)'
if not callable(self.syndicateRun):
- raise RuntimeException, 'Complete [' + self.__class__ + '] with a callable syndicateRun(self,run)'
+ raise RuntimeException, 'Complete [' + `self.__class__` + '] with a callable syndicateRun(self,run)'
log.info('Syndicate run using [' + `self` + ']')
1.15 +7 -0 jakarta-gump/python/gump/model/object.py
Index: object.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/model/object.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- object.py 9 Jan 2004 19:57:18 -0000 1.14
+++ object.py 10 Feb 2004 20:18:40 -0000 1.15
@@ -292,6 +292,13 @@
def getPath(self):
return self.path;
+ def hasId(self):
+ if self.xml.id: return 1
+ return 0
+
+ def setId(self,id):
+ self.id = id
+
def getId(self):
return self.xml.id
1.42 +24 -6 jakarta-gump/python/gump/model/project.py
Index: project.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/model/project.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- project.py 10 Feb 2004 04:07:24 -0000 1.41
+++ project.py 10 Feb 2004 20:18:40 -0000 1.42
@@ -278,6 +278,9 @@
def getJars(self):
return self.jars.values()
+ def getJarAt(self,index):
+ return self.jars[index]
+
def hasReports(self):
if self.reports: return 1
return 0
@@ -477,8 +480,23 @@
jar.setPath(os.path.abspath(os.path.join(self.home,j.name)))
self.addJar(jar)
else:
- #:TODO: Warn .. no name
- pass
+ self.addError('Found a <jar with no name...')
+
+ #
+ # Fix 'ids' on all Jars which don't have them
+ #
+ if self.hasJars():
+ if 1 == self.getJarCount():
+ if not self.getJarAt(0).hasId():
+ self.getJarAt(0).setId(self,getName())
+ else:
+ #
+ # :TODO: A work in progress, not sure how
+ # we ought 'construct' ids.
+ #
+ for jar in self.getJars():
+ if not jar.hasId():
+ jar.setId(os.path.basename(jar.getPath()))
# Grab all the work
for w in self.xml.work:
@@ -1008,7 +1026,7 @@
# ------------------------------------------------------------------------
# Jars set explicity by path.
# ------------------------------------------------------------------------
- """)
+""")
(classpath,bootclasspath)=self.getClasspathLists()
1.8 +4 -4 jakarta-gump/python/gump/document/documenter.py
Index: documenter.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/document/documenter.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- documenter.py 9 Jan 2004 19:57:20 -0000 1.7
+++ documenter.py 10 Feb 2004 20:18:40 -0000 1.8
@@ -78,10 +78,10 @@
#
def document(self,run):
if not hasattr(self,'documentRun'):
- raise RuntimeException, 'Complete [' + self.__class__ + '] with documentRun(self,run)'
+ raise RuntimeException, 'Complete [' + `self.__class__` + '] with documentRun(self,run)'
if not callable(self.documentRun):
- raise RuntimeException, 'Complete [' + self.__class__ + '] with a callable documentRun(self,run)'
+ raise RuntimeException, 'Complete [' + `self.__class__` + '] with a callable documentRun(self,run)'
log.info('Document run using [' + `self` + ']')
@@ -89,9 +89,9 @@
def getResolver(self,run):
if not hasattr(self,'getResolverForRun'):
- raise RuntimeException, 'Complete [' + self.__class__ + '] with getResolverForRun(self,run)'
+ raise RuntimeException, 'Complete [' + `self.__class__` + '] with getResolverForRun(self,run)'
if not callable(self.getResolverForRun):
- raise RuntimeException, 'Complete [' + self.__class__ + '] with a callable getResolverForRun(self,run)'
+ raise RuntimeException, 'Complete [' + `self.__class__` + '] with a callable getResolverForRun(self,run)'
return self.getResolverForRun(run)
1.11 +16 -4 jakarta-gump/python/gump/document/xdoc.py
Index: xdoc.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/document/xdoc.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- xdoc.py 10 Feb 2004 00:25:34 -0000 1.10
+++ xdoc.py 10 Feb 2004 20:18:40 -0000 1.11
@@ -177,7 +177,13 @@
self.context=context
self.subpieces=[]
self.keeper=1
- self.emptyOk=0
+ self.emptyOk=0
+
+ def __repr__(self):
+ return str(self.__class__)
+
+ def __str__(self):
+ return str(self.__class__)
def createSubContext(self,transient=0):
#
@@ -249,6 +255,12 @@
def __init__(self,context,title):
XDocPiece.__init__(self,context)
self.title=title
+
+ def __repr__(self):
+ return str(self.__class__) + ':' + self.title
+
+ def __str__(self):
+ return str(self.__class__) + ':' + self.title
def start(self):
self.context.writeLineIndented('<section><title>%s</title>' % (self.title))
1.69 +7 -5 jakarta-gump/python/gump/document/forrest.py
Index: forrest.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- forrest.py 10 Feb 2004 01:00:14 -0000 1.68
+++ forrest.py 10 Feb 2004 20:18:40 -0000 1.69
@@ -803,11 +803,13 @@
detailList.createEntry('Title: ', server.getTitle())
if server.hasUrl():
- detailList.createEntry('URL: ').createFork(server.getUrl())
+ detailList.createEntry('URL: ').createFork( \
+ server.getUrl(),server.getUrl())
# Parent 'site' (owner reference)
if server.hasSite() and not server.getSite() == server.getUrl():
- detailList.createEntry('Site: ').createFork(server.getSite())
+ detailList.createEntry('Site: ').createFork( \
+ server.getSite(), server.getSite())
self.documentXML(document,server)
1.3 +1 -1 jakarta-gump/python/gump/utils/owner.py
Index: owner.py
===================================================================
RCS file: /home/cvs/jakarta-gump/python/gump/utils/owner.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- owner.py 9 Jan 2004 19:57:19 -0000 1.2
+++ owner.py 10 Feb 2004 20:18:40 -0000 1.3
@@ -86,7 +86,7 @@
log.error('Circular path @ ' + `self`)
return
visited.append(self)
- log.info(getIndent(len(visited))+str(self))
+ log.info(getIndent(len(visited))+`self`)
if self.hasOwner():
self.getOwner().displayOwnership(visited)
return