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/08/24 21:25:36 UTC
svn commit: rev 36821 - in gump/live: . bin cron python python/gump python/gump/admin python/gump/build python/gump/core python/gump/document/text python/gump/document/xdocs python/gump/integration python/gump/java python/gump/model python/gump/process python/gump/repository python/gump/run python/gump/runner python/gump/syndication python/gump/test python/gump/update python/gump/utils python/test
Author: ajack
Date: Tue Aug 24 12:25:34 2004
New Revision: 36821
Added:
gump/live/bin/repo.py (props changed)
- copied unchanged from rev 36787, gump/trunk/bin/repo.py
gump/live/exe.py (props changed)
- copied unchanged from rev 36787, gump/trunk/exe.py
gump/live/python/gump/document/xdocs/synchronizer.py
- copied unchanged from rev 36787, gump/trunk/python/gump/document/xdocs/synchronizer.py
Removed:
gump/live/bin/exe.py
gump/live/python/test/
Modified:
gump/live/ (props changed)
gump/live/bin/build.py (contents, props changed)
gump/live/bin/check.py (contents, props changed)
gump/live/bin/env.py (contents, props changed)
gump/live/bin/gmp.bat (props changed)
gump/live/bin/gmp.py (props changed)
gump/live/bin/gmp.sh (props changed)
gump/live/bin/integrate.py (contents, props changed)
gump/live/bin/preview.py (contents, props changed)
gump/live/bin/redo.py (contents, props changed)
gump/live/bin/update.py (contents, props changed)
gump/live/cron/gump.sh (props changed)
gump/live/gump.py (contents, props changed)
gump/live/python/ (props changed)
gump/live/python/gump/__init__.py
gump/live/python/gump/admin/__init__.py
gump/live/python/gump/admin/stats.py
gump/live/python/gump/build/__init__.py
gump/live/python/gump/build/ant.py
gump/live/python/gump/build/builder.py
gump/live/python/gump/build/maven.py
gump/live/python/gump/build/script.py
gump/live/python/gump/core/__init__.py
gump/live/python/gump/core/commandLine.py
gump/live/python/gump/core/gumpinit.py
gump/live/python/gump/document/text/__init__.py
gump/live/python/gump/document/text/documenter.py
gump/live/python/gump/document/text/resolver.py
gump/live/python/gump/document/xdocs/__init__.py
gump/live/python/gump/document/xdocs/documenter.py
gump/live/python/gump/document/xdocs/xdoc.py
gump/live/python/gump/integration/cvs.py
gump/live/python/gump/integration/depot.py
gump/live/python/gump/java/cp.py
gump/live/python/gump/java/helper.py
gump/live/python/gump/model/depend.py
gump/live/python/gump/model/module.py
gump/live/python/gump/model/project.py
gump/live/python/gump/model/propagation.py
gump/live/python/gump/model/state.py
gump/live/python/gump/process/launcher.py
gump/live/python/gump/repository/artifact.py
gump/live/python/gump/repository/publisher.py
gump/live/python/gump/run/gumprun.py
gump/live/python/gump/run/options.py
gump/live/python/gump/runner/demand.py
gump/live/python/gump/runner/runner.py
gump/live/python/gump/syndication/atom.py
gump/live/python/gump/syndication/rss.py
gump/live/python/gump/test/artifacts.py
gump/live/python/gump/update/artifact.py
gump/live/python/gump/update/cvs.py
gump/live/python/gump/utils/sync.py
gump/live/python/gump/utils/work.py
gump/live/python/header.txt (contents, props changed)
Log:
Migrated test (trunk) to public (live).
Modified: gump/live/bin/build.py
==============================================================================
--- gump/live/bin/build.py (original)
+++ gump/live/bin/build.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
This is one commandline entrypoint into gump.
Modified: gump/live/bin/check.py
==============================================================================
--- gump/live/bin/check.py (original)
+++ gump/live/bin/check.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
Checks that the Gump definitions are ok.
Modified: gump/live/bin/env.py
==============================================================================
--- gump/live/bin/env.py (original)
+++ gump/live/bin/env.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
Checks that the Gump Environment is ok.
"""
Modified: gump/live/bin/integrate.py
==============================================================================
--- gump/live/bin/integrate.py (original)
+++ gump/live/bin/integrate.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
#
# $Header: /home/stefano/cvs/gump/python/gump/integrate.py,v 1.31 2004/07/19 16:07:53 ajack Exp $
#
Modified: gump/live/bin/preview.py
==============================================================================
--- gump/live/bin/preview.py (original)
+++ gump/live/bin/preview.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
#
# $Header: /home/stefano/cvs/gump/python/gump/preview.py,v 1.9 2004/07/28 15:50:29 ajack Exp $
#
Modified: gump/live/bin/redo.py
==============================================================================
--- gump/live/bin/redo.py (original)
+++ gump/live/bin/redo.py Tue Aug 24 12:25:34 2004
@@ -15,6 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
This is one commandline entrypoint into Gump.
Modified: gump/live/bin/update.py
==============================================================================
--- gump/live/bin/update.py (original)
+++ gump/live/bin/update.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
#
# $Header: /home/stefano/cvs/gump/python/gump/update.py,v 1.31 2004/07/19 16:07:53 ajack Exp $
#
Modified: gump/live/gump.py
==============================================================================
--- gump/live/gump.py (original)
+++ gump/live/gump.py Tue Aug 24 12:25:34 2004
@@ -15,14 +15,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-# $Header: $
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
"""
This is the commandline entrypoint into Python Gump,
- used *primarily* by nightly cron jobs.
+ for full integrations. See cron/gump.py for the same
+ but used *primarily* by nightly cron jobs.
- It updates Gump (from CVS) to ensure it (itself) is
+ It updates Gump (from soruce control) to ensure it (itself) is
latest, does some environment twiddling, and runs the
main gump/integration.py. Bit more twiddling with
outputs afterwards...
Modified: gump/live/python/gump/__init__.py
==============================================================================
--- gump/live/python/gump/__init__.py (original)
+++ gump/live/python/gump/__init__.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
#
# $Header: /home/stefano/cvs/gump/python/gump/__init__.py,v 1.25 2004/07/19 16:07:53 ajack Exp $
#
Modified: gump/live/python/gump/admin/__init__.py
==============================================================================
--- gump/live/python/gump/admin/__init__.py (original)
+++ gump/live/python/gump/admin/__init__.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
#
# $Header: /home/stefano/cvs/gump/python/gump/admin/__init__.py,v 1.2 2004/07/13 18:44:35 ajack Exp $
#
Modified: gump/live/python/gump/admin/stats.py
==============================================================================
--- gump/live/python/gump/admin/stats.py (original)
+++ gump/live/python/gump/admin/stats.py Tue Aug 24 12:25:34 2004
@@ -15,6 +15,12 @@
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
A tool for statistics manipulation [e.g. reseting, etc.]
Modified: gump/live/python/gump/build/__init__.py
==============================================================================
--- gump/live/python/gump/build/__init__.py (original)
+++ gump/live/python/gump/build/__init__.py Tue Aug 24 12:25:34 2004
@@ -15,6 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
# tell Python what modules make up the gump.test package
__all__ = ["builder", "ant","script","maven", "java"]
Modified: gump/live/python/gump/build/ant.py
==============================================================================
--- gump/live/python/gump/build/ant.py (original)
+++ gump/live/python/gump/build/ant.py Tue Aug 24 12:25:34 2004
@@ -15,6 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
An Ant builder (uses ant to build projects)
"""
Modified: gump/live/python/gump/build/builder.py
==============================================================================
--- gump/live/python/gump/build/builder.py (original)
+++ gump/live/python/gump/build/builder.py Tue Aug 24 12:25:34 2004
@@ -15,6 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
This is the main project builder for gump.
@@ -58,6 +64,8 @@
from gump.model.stats import *
from gump.model.state import *
+import gump.integration.depot
+
import gump.java.helper
@@ -86,8 +94,8 @@
workspace=self.run.getWorkspace()
- log.info('Build Project: #[' + `project.getPosition()` + '] : ' + project.getName())
-
+ log.info('Build Project: #[' + `project.getPosition()` + '] : ' + project.getName() + ' : [state:' \
+ + project.getStateDescription() + ']')
# Right now everything is Java..
languageHelper=self.run.getJavaHelper()
@@ -100,58 +108,52 @@
# :TODO: Code this nicer, perhaps...
if project.isPackaged():
self.performProjectPackageProcessing(project, languageHelper, stats)
- return
-
- # Do this even if not ok
- self.performPreBuild(project, languageHelper, stats)
+ else:
+ # Do this even if not ok
+ self.performPreBuild(project, languageHelper, stats)
- if project.okToPerformWork():
- log.debug('Performing Build Upon: [' + `project.getPosition()` + '] ' + project.getName())
+ if project.okToPerformWork():
+ log.debug('Performing Build Upon: [' + `project.getPosition()` + '] ' + project.getName())
- # Turn on --verbose or --debug if failing ...
- if stats:
- if (not STATE_SUCCESS == stats.currentState) and \
- not project.isVerboseOrDebug():
- if stats.sequenceInState > SIGNIFICANT_DURATION:
- project.addInfo('Enable "debug" output, due to a sequence of %s previous errors.' % stats.sequenceInState)
- project.setDebug(True)
- else:
- project.addInfo('Enable "verbose" output, due to %s previous error(s).' % stats.sequenceInState)
- project.setVerbose(True)
-
- # Pick your poison..
- if project.hasScript():
- self.script.buildProject(project, languageHelper, stats)
- elif project.hasAnt():
- self.ant.buildProject(project, languageHelper, stats)
- elif project.hasMaven():
- self.maven.buildProject(project, languageHelper, stats)
-
- if not project.okToPerformWork() and not project.isDebug():
- # Display...
- project.addInfo('Enable "debug" output, due to build failure.')
- project.setDebug(1)
-
- # Do this even if not ok
- self.performPostBuild( project, languageHelper, stats )
+ # Turn on --verbose or --debug if failing ...
+ #if stats:
+ # if (not STATE_SUCCESS == stats.currentState) and \
+ # not project.isVerboseOrDebug():
+ # if stats.sequenceInState > SIGNIFICANT_DURATION:
+ # project.addInfo('Enable "debug" output, due to a sequence of %s previous errors.' % stats.sequenceInState)
+ # project.setDebug(True)
+ # else:
+ # project.addInfo('Enable "verbose" output, due to %s previous error(s).' % stats.sequenceInState)
+ # project.setVerbose(True)
+
+ # Pick your poison..
+ if project.hasScript():
+ self.script.buildProject(project, languageHelper, stats)
+ elif project.hasAnt():
+ self.ant.buildProject(project, languageHelper, stats)
+ elif project.hasMaven():
+ self.maven.buildProject(project, languageHelper, stats)
+
+ # Do this even if not ok
+ self.performPostBuild( project, languageHelper, stats )
+
+ # If not ok, we might have some artifacts in the repository that
+ # are of value...
+ if not project.okToPerformWork() and project.hasOutputs():
+ self.extractFromRepository(project, languageHelper)
- if project.isFailed():
- log.warn('Failed to build project #[' + `project.getPosition()` + '] : [' + project.getName() + '], state:' \
- + project.getStateDescription())
+ if project.isFailed():
+ log.warn('Failed to build project #[' + `project.getPosition()` + '] : [' + project.getName() + '], state:' \
+ + project.getStateDescription())
def performDelete(self,project,delete,index=0):
- """ Perform the delete command for a <delete entry """
-
- return
+ """
+ Perform the delete command for a <delete entry
- # :TODO: Re-instate this some time, when can delete
- # non-empty directories.
+ no Return
+ """
- basedir=os.path.abspath(project.getModule().getWorkingDirectory() or dir.base)
-
- #
# Delete a directory and/or a file
- #
if delete.hasDirectory():
dir=delete.getDirectory()
try:
@@ -195,9 +197,12 @@
project.addError(' <mkdir without \'dir\' attribute.')
raise RuntimeError('Bad <mkdir, missing \'dir\' attribute')
- def performPreBuild( self, project, language, stats ):
+ def performPreBuild( self, project, languageHelper, stats ):
+
"""
Perform pre-build Actions
+
+ No return.
"""
log.debug(' ------ Performing pre-Build Actions (mkdir/delete) for : '+ project.getName())
@@ -235,11 +240,12 @@
if startedOk and not project.okToPerformWork():
log.warn('Failed to perform pre-build on project [' + project.getName() + ']')
- def performPostBuild(self, project, language, stats):
+ def performPostBuild(self, project, languageHelper, stats):
"""
Perform Post-Build Actions
+
+ No return.
"""
-
log.debug(' ------ Performing post-Build Actions (check jars) for : '+ project.getName())
if project.okToPerformWork():
@@ -247,7 +253,7 @@
outputs = []
# Ensure the jar output were all generated correctly.
- outputsOk=1
+ outputsOk=True
for jar in project.getJars():
jarPath=os.path.abspath(jar.getPath())
# Add to list of outputs, in case we
@@ -268,7 +274,7 @@
# Add to list of outputs, in case we
# fail to find, and need to go list
- # directoiries
+ # directories
outputs.append(licensePath)
if not os.path.exists(licensePath):
@@ -319,7 +325,7 @@
catDirectoryContentsToFileHolder(project, reportDir, FILE_TYPE_OUTPUT)
- def performProjectPackageProcessing(self, project, language, stats):
+ def performProjectPackageProcessing(self, project, languageHelper, stats):
"""
Perform Package Processing Actions
"""
@@ -372,9 +378,7 @@
"""
if project.okToPerformWork():
- #
# Check the package was installed correctly...
- #
outputsOk=1
for jar in project.getJars():
jarpath=jar.getPath()
@@ -394,7 +398,82 @@
# List them, why not...
listDirectoryToFileHolder(project,project.getHomeDirectory(),
FILE_TYPE_PACKAGE, 'list_package_'+project.getName())
+
+ def extractFromRepository(self, project, languageHelper):
+ """
+ If failed to build, see if we have a copy in the repo...
+
+ No return.
+ """
+
+ if not project.hasOutputs(): return
+
+ log.info(' ------ Perform Artifact Repository Search for : '+ project.getName())
+
+ group=project.getArtifactGroup()
+
+ # See if we have any...
+ artifacts = self.repository.extractMostRecentGroup(group)
+ if not artifacts:
+ self.checkUpstreamRepositories(project)
+ # Then try again...
+ artifacts = self.repository.extractMostRecentGroup(group)
+
+ # :TODO:
+ # If not artifacts, download using Depot?
+
+ artifactsOk=False
+
+ if artifacts:
+ # Be a positive thinker...
+ artifactsOk=True
+ # See if we can use 'stored' artifacts.
+ for jar in project.getJars():
+ id = jar.getId()
+
+ # Use the repository one...
+ if artifacts.has_key(id):
+ (aid,date,extn,path)=artifacts[id]
+
+ log.info('Utilize %s from Gump artifact repository for id' % (path, id))
+
+ # Stash this fallback...
+ jar.setPath(path)
+ else:
+ log.info('Failed to find artifact for id %s (Gump Repo has %s in %s)' % \
+ (id, artifacts.keys(), group))
+
+ artifactsOk=False
+ break
+
+ if artifactsOk:
+ log.debug(' ------ Extracted (fallback) artifacts from Repository : '+ project.getName())
+ project.addDebug('Extracted fallback artifacts from Gump Repository')
+ else:
+ log.error(' ------ Extracted (fallback) artifacts from Repository : '+ project.getName())
+ project.addInfo('Failed to extract fallback artifacts from Gump Repository')
+
+ def checkUpstreamRepositories(self,project):
+ """
+
+ See if we can download something...
+
+ """
+ if self.run.getEnvironment().noDepot: return
+
+ log.info(' ------ Check upstream repositories for : '+ project.getName())
+
+ cmd=gump.integration.depot.getGroupUpdateCommand(project.getArtifactGroup(),
+ self.repository.getRepositoryDir())
+
+ # Execute the command ....
+ cmdResult=execute(cmd,self.run.getWorkspace().tmpdir)
+
+ # Update context with the fact that this work was done
+ work=CommandWorkItem(WORK_TYPE_UPDATE,cmd,cmdResult)
+ project.performedWork(work)
+
def preview(self,project,languageHelper):
"""
Preview what a build would do.
Modified: gump/live/python/gump/build/maven.py
==============================================================================
--- gump/live/python/gump/build/maven.py (original)
+++ gump/live/python/gump/build/maven.py Tue Aug 24 12:25:34 2004
@@ -15,6 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
"""
Modified: gump/live/python/gump/build/script.py
==============================================================================
--- gump/live/python/gump/build/script.py (original)
+++ gump/live/python/gump/build/script.py Tue Aug 24 12:25:34 2004
@@ -15,6 +15,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
"""
Modified: gump/live/python/gump/core/__init__.py
==============================================================================
--- gump/live/python/gump/core/__init__.py (original)
+++ gump/live/python/gump/core/__init__.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
#
# $Header: /home/stefano/cvs/gump/python/gump/core/__init__.py,v 1.5 2004/07/19 16:07:56 ajack Exp $
#
Modified: gump/live/python/gump/core/commandLine.py
==============================================================================
--- gump/live/python/gump/core/commandLine.py (original)
+++ gump/live/python/gump/core/commandLine.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
Commandline Handling.
Modified: gump/live/python/gump/core/gumpinit.py
==============================================================================
--- gump/live/python/gump/core/gumpinit.py (original)
+++ gump/live/python/gump/core/gumpinit.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
#
# $Header: /home/stefano/cvs/gump/python/gump/core/gumpinit.py,v 1.5 2004/07/13 18:44:35 ajack Exp $
#
Modified: gump/live/python/gump/document/text/__init__.py
==============================================================================
--- gump/live/python/gump/document/text/__init__.py (original)
+++ gump/live/python/gump/document/text/__init__.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
# tell Python what modules make up the gump.document package
Modified: gump/live/python/gump/document/text/documenter.py
==============================================================================
--- gump/live/python/gump/document/text/documenter.py (original)
+++ gump/live/python/gump/document/text/documenter.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
Text documentation...
Modified: gump/live/python/gump/document/text/resolver.py
==============================================================================
--- gump/live/python/gump/document/text/resolver.py (original)
+++ gump/live/python/gump/document/text/resolver.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
Resolving URLs/Files.
"""
Modified: gump/live/python/gump/document/xdocs/__init__.py
==============================================================================
--- gump/live/python/gump/document/xdocs/__init__.py (original)
+++ gump/live/python/gump/document/xdocs/__init__.py Tue Aug 24 12:25:34 2004
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+__revision__ = "$Rev: 36667 $"
+__date__ = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
+
"""
Documentation (Forrest XDOCS or XHTML)
Modified: gump/live/python/gump/document/xdocs/documenter.py
==============================================================================
--- gump/live/python/gump/document/xdocs/documenter.py (original)
+++ gump/live/python/gump/document/xdocs/documenter.py Tue Aug 24 12:25:34 2004
@@ -105,9 +105,6 @@
if self.run.getOptions().isOfficial():
self.documentStatistics()
self.documentXRef()
-
- # Synchronize xdocs...
- return self.syncXDocs()
#####################################################################
#
@@ -252,35 +249,6 @@
return success
- def syncXDocs(self):
-
- # The move contents/xdocs from work directory to log
- xdocWorkDir=self.getXDocWorkDirectory()
- logDirectory=self.getXDocLogDirectory()
-
- log.info('Synchronize work->log, and clean-up...')
-
- success=True
- try:
-
- if self.run.getOptions().isOfficial():
- # Sync over public pages...
- syncDirectories(xdocWorkDir,logDirectory)
- else:
- # Copy over public pages...
- copyDirectories(xdocWorkDir,logDirectory)
-
- cleanUp=True
- if cleanUp:
- # Clean-up work area
- wipeDirectoryTree(xdocWorkDir)
-
- except:
- log.error('--- Failed to work->log sync and/or clean-up', exc_info=1)
- success=False
-
- return success
-
#####################################################################
#
# Workspace Pieces
@@ -311,10 +279,19 @@
rssSyndRow=definitionTable.createRow()
rssSyndRow.createData().createStrong('Syndication')
- rssSyndRow.createData().createFork('rss.xml','RSS')
+ rssArea=rssSyndRow.createData()
+ rssArea.createFork('rss.xml','RSS')
+ rssUrl=self.resolver.getUrl(self.workspace,'rss','.xml')
+ rssArea.createFork('http://www.feedvalidator.org/check.cgi?url=' + rssUrl) \
+ .createIcon(self.resolver.getImageUrl('valid-rss.png'), alt='[Valid RSS]') #, title='Validate my RSS feed', width='88', height='31')
+
atomSyndRow=definitionTable.createRow()
atomSyndRow.createData().createStrong('Syndication')
- atomSyndRow.createData().createFork('atom.xml','Atom')
+ atomArea=atomSyndRow.createData()
+ atomArea.createFork('atom.xml','Atom')
+ atomUrl=self.resolver.getUrl(self.workspace,'atom','.xml')
+ atomArea.createFork('http://www.feedvalidator.org/check.cgi?url=' + atomUrl) \
+ .createIcon(self.resolver.getImageUrl('valid-atom.png'), alt='[Valid Atom]') #, title='Validate my Atom feed', width='88', height='31')
self.documentSummary(document,self.workspace.getProjectSummary())
@@ -360,9 +337,22 @@
optTable=optSection.createTable(['Name','Value'])
opts=0
+
+ descs={ 'Build':'Perform Build',
+ 'XDocs':'Generate XDOCS',
+ 'Statistics':'Update Statistics (to database)',
+ 'Verbose':'Verbose Run',
+ 'Cache':'Cache metadata (don\'t go to remote source)',
+ 'Text':'Text Output',
+ 'Official':'Official Run (e.g. nag notifies, etc.)',
+ 'Results':'Generate Results' }
+
# iterate over this suites properties
for (name,value) in getBeanAttributes(options).items():
- optTable.createEntry(name,value)
+ desc=name
+ if descs.has_key(name):
+ desc = descs[name] + ' (' + name + ')'
+ optTable.createEntry(desc,value)
opts+=1
if not opts: optTable.createEntry('None')
@@ -375,24 +365,13 @@
envSection=document.createSection('Gump Environment')
envSection.createParagraph(
"""The environment that this Gump run was within.""")
-
- descs={ 'Build':'Perform Build',
- 'XDocs':'Generate XDOCS',
- 'Statistics':'Update Statistics (to database)',
- 'Verbose':'Verbose Run',
- 'Cache':'Cache metadata (don\'t go to remote source)',
- 'Text':'Text Output',
- 'Official':'Official Run (e.g. nag notifies, etc.)',
- 'Results':'Generate Results' }
+
propertiesSection=envSection.createSection('Properties')
envTable=propertiesSection.createTable(['Name/Description','Value'])
envs=0
# iterate over this suites properties
for (name,value) in getBeanAttributes(environment).items():
- desc=name
- if descs.has_key(name):
- desc = descs[name] + ' (' + name + ')'
- envTable.createEntry(desc,str(value))
+ envTable.createEntry(name,str(value))
envs+=1
if not envs: envTable.createEntry('None')
@@ -1758,12 +1737,11 @@
# Display nag information
if project.hasNotifys():
- if project.isVerboseOrDebug():
- for pair in project.getNotifys():
- toaddr=pair.getToAddress()
- fromaddr=pair.getFromAddress()
- detailsList.createEntry('Notify To: ').createFork('mailto:'+toaddr,toaddr)
- detailsList.createEntry('Notify From: ').createFork('mailto:'+fromaddr,fromaddr)
+ for pair in project.getNotifys():
+ toaddr=pair.getToAddress()
+ fromaddr=pair.getFromAddress()
+ detailsList.createEntry('Notify To: ').createFork('mailto:'+toaddr,toaddr)
+ detailsList.createEntry('Notify From: ').createFork('mailto:'+fromaddr,fromaddr)
elif not project.isPackaged() and project.hasBuilder():
document.createWarning('This project does not utilize Gump notification.')
Modified: gump/live/python/gump/document/xdocs/xdoc.py
==============================================================================
--- gump/live/python/gump/document/xdocs/xdoc.py (original)
+++ gump/live/python/gump/document/xdocs/xdoc.py Tue Aug 24 12:25:34 2004
@@ -722,7 +722,7 @@
def __init__(self,title,output=None,config=None,rootpath='.'):
if isinstance(output,types.StringTypes):
self.xfile=output
- log.debug('Documenting to file : [' + self.xfile + ']')
+ #log.debug('Documenting to file : [' + self.xfile + ']')
# Open for writing with a decent sized buffer.
self.output=open(self.xfile, 'w', 4096)
else:
Modified: gump/live/python/gump/integration/cvs.py
==============================================================================
--- gump/live/python/gump/integration/cvs.py (original)
+++ gump/live/python/gump/integration/cvs.py Tue Aug 24 12:25:34 2004
@@ -91,8 +91,9 @@
logins[root]=newpass
else:
- log.debug('Login already available for: ' + repository.getName() \
- + ' @ ' + root)
+ pass
+ #log.debug('Login already available for: ' + repository.getName() \
+ # + ' @ ' + root)
else:
log.warn('Unable to provide login for CVS repository: ' + repository.getName() \
+ ' @ ' + root + ' method: ' + str(repository.getMethod()) )
Modified: gump/live/python/gump/integration/depot.py
==============================================================================
--- gump/live/python/gump/integration/depot.py (original)
+++ gump/live/python/gump/integration/depot.py Tue Aug 24 12:25:34 2004
@@ -23,6 +23,8 @@
from gump import log
from gump.core.config import *
+import gump.process.command
+
def getDepotHome(visual=True):
if os.environ.has_key('DEPOT_UPDATE_HOME'):
return os.environ['DEPOT_UPDATE_HOME']
@@ -37,6 +39,27 @@
def getDepotUpdateCmd():
return sys.executable+' '+getDepotUpdatePath()+' update'
+def getGroupUpdateCommand(group,repository):
+ """
+ Create the Depot command line for updating this group
+ from an upstream repository.
+ """
+
+ log.debug("Artifact Update Group: " + group)
+
+ # Prepare Artifact checkout/update command...
+ cmd=gump.process.command.Cmd(getDepotUpdateCmd(), 'update_'+group, repository)
+
+ # Group (mandatory)
+ cmd.addParameter('-g',group)
+
+ # Group (mandatory, if no URL)
+ cmd.addParameter('-rs','gump')
+
+ # Target
+ cmd.addParameter('-t',repository)
+
+ return cmd
Modified: gump/live/python/gump/java/cp.py
==============================================================================
--- gump/live/python/gump/java/cp.py (original)
+++ gump/live/python/gump/java/cp.py Tue Aug 24 12:25:34 2004
@@ -61,10 +61,12 @@
return c
def hasContributor(self):
+ """ Do we know which entity contributed this path component? """
if self.contributor: return True
return False
def getContributor(self):
+ """ The cotributing entity """
return self.contributor
def hasId(self):
@@ -75,10 +77,12 @@
return self.id
def hasInstigator(self):
+ """ Do we know which entity instagated this path component? """
if self.instigator: return True
return False
def getInstigator(self):
+ """ The instagating entity """
return self.instigator
def getPath(self):
Modified: gump/live/python/gump/java/helper.py
==============================================================================
--- gump/live/python/gump/java/helper.py (original)
+++ gump/live/python/gump/java/helper.py Tue Aug 24 12:25:34 2004
@@ -43,7 +43,7 @@
# Caches for classpaths
self.classpaths={}
- self.bootclasspaths={}
+ self.bootclasspaths={}
def getJVMArgs(self,project):
@@ -63,9 +63,7 @@
# Calculate classpath and bootclasspath
(classpath, bootclasspath) = self.getClasspathObjects(project,debug)
- #
# Return them simple/flattened
- #
return ( classpath.getFlattened(), bootclasspath.getFlattened() )
@@ -74,6 +72,8 @@
The basic classpath needs to include a compiler...
+ Return a system classpath (to include $JAVA_HOME/lib/tools.jar'
+ for a compiler).
"""
sysClasspath=gump.java.cp.Classpath('System Classpath')
javaHome=self.run.getEnvironment().getJavaHome()
@@ -186,7 +186,12 @@
dependStr += 'Runtime'
# Append JARS for this project
- # (respect ids)
+ # (respect ids --- none means 'all)
+ ####################################################
+ # Note, if they don't come from the project outputs
+ # (e.g. 'cos the project failed) attempt to get them
+ # from the repository. [This has been done already,
+ # so is transparent here.]
projectIds=[]
for jar in project.getJars():
# Store for double checking
Modified: gump/live/python/gump/model/depend.py
==============================================================================
--- gump/live/python/gump/model/depend.py (original)
+++ gump/live/python/gump/model/depend.py Tue Aug 24 12:25:34 2004
@@ -441,11 +441,9 @@
def buildDependenciesMap(self,workspace):
- #
# Provide backwards links [Note: ant|maven might have added some
# dependencies, so this is done here & not just with the direct
# xml depend/option elements]
- #
for dependency in self.getDirectDependencies():
dependProject=dependency.getProject()
# Add us as a dependee on them
@@ -457,6 +455,14 @@
if dependency.getProject().getName()==name \
and not dependency.isNoClasspath() :
return True
+ return False
+
+ def uponFuzzy(self):
+ """
+ At least one of these dependencies is Fuzzy...
+ """
+ for dependency in self.getFullDependencies():
+ if dependency.getProject().isFuzzy(): return True
return False
# determine if this project is a prereq of any project on the todo list
Modified: gump/live/python/gump/model/module.py
==============================================================================
--- gump/live/python/gump/model/module.py (original)
+++ gump/live/python/gump/model/module.py Tue Aug 24 12:25:34 2004
@@ -432,6 +432,15 @@
def getNotifys(self):
return self.notifys
+ def getArtifactGroup(self):
+ """
+ What does this projects artifacts group under?
+ Right now ... the module name
+
+ Return String
+ """
+ return self.getName()
+
def addProject(self,project):
"""
Associate this module with this project, and vice verse.
Modified: gump/live/python/gump/model/project.py
==============================================================================
--- gump/live/python/gump/model/project.py (original)
+++ gump/live/python/gump/model/project.py Tue Aug 24 12:25:34 2004
@@ -120,6 +120,15 @@
return self.module.getNotifys()
return self.notifys
+ def getArtifactGroup(self):
+ """
+ What does this projects artifacts group under?
+ Ask the module...
+
+ Return String
+ """
+ return self.getModule().getArtifactGroup()
+
def hasAnt(self):
if self.ant: return True
return False
Modified: gump/live/python/gump/model/propagation.py
==============================================================================
--- gump/live/python/gump/model/propagation.py (original)
+++ gump/live/python/gump/model/propagation.py Tue Aug 24 12:25:34 2004
@@ -54,9 +54,7 @@
# List of things that caused issues...
self.addCause(cause)
- #
# Describe the problem
- #
if not message:
message = lower(stateDescription(state))
if not REASON_UNSET == reason:
Modified: gump/live/python/gump/model/state.py
==============================================================================
--- gump/live/python/gump/model/state.py (original)
+++ gump/live/python/gump/model/state.py Tue Aug 24 12:25:34 2004
@@ -24,14 +24,16 @@
STATE_NONE=1
STATE_SUCCESS=2
STATE_FAILED=3
-STATE_STALE=4
+STATE_STALE_SUCCESS=4
+STATE_STALE_FAILED=5
+STATE_FUZZY_SUCCESS=5
+STATE_FUZZY_FAILED=4
STATE_PREREQ_FAILED=5
STATE_COMPLETE=6
stateNames = { STATE_UNSET : "Unset",
STATE_NONE : "NoWork",
STATE_SUCCESS : "Success",
- STATE_STALE : "Stale",
STATE_FAILED : "Failed",
STATE_PREREQ_FAILED : "PrereqFailed",
STATE_COMPLETE : "Complete" }
@@ -40,7 +42,6 @@
STATE_NONE : "No Work Performed",
STATE_SUCCESS : "Success",
STATE_FAILED : "Failed",
- STATE_STALE : "Stale",
STATE_PREREQ_FAILED : "Prerequisite Failed",
STATE_COMPLETE : "Complete" }
@@ -54,7 +55,6 @@
"NoWork" : STATE_NONE,
"Success" : STATE_SUCCESS,
"Failed" : STATE_FAILED,
- "Stale" : STATE_STALE,
"PrereqFailed" : STATE_PREREQ_FAILED,
"Complete" : STATE_COMPLETE}
@@ -62,7 +62,6 @@
"No Work Performed" : STATE_NONE,
"Success" : STATE_SUCCESS,
"Failed" : STATE_FAILED,
- "Stale" : STATE_STALE,
"Prerequisite Failed" : STATE_PREREQ_FAILED,
"Complete" : STATE_COMPLETE}
@@ -185,9 +184,7 @@
if self.isReasonUnset(): return ''
return reasonDescription(self.getReason())
- #
- #
- #
+ # Simple Tests
def isSuccess(self):
return STATE_SUCCESS == self.state
@@ -196,7 +193,7 @@
def isFailed(self):
return STATE_FAILED == self.state
-
+
def isPrereqFailed(self):
return STATE_PREREQ_FAILED == self.state
@@ -211,11 +208,14 @@
return self.isUnset() or self.isOk()
def isOk(self):
- return self.isSuccess() or self.isComplete()
+ return self.isSuccess() or self.isComplete()
def isNotOk(self):
- return self.isFailed() or self.isPrereqFailed()
-
+ return self.isFailed()
+
+ def okToPerformWork(self):
+ return self.isUnsetOrOk() or self.isPrereqFailed()
+
class Stateful:
def __init__(self):
"""
@@ -241,8 +241,7 @@
return self.statePair.getStateDescription()
def hasReason(self):
- if self.statePair.isReasonUnset(): return 0
- return 1
+ return self.statePair.isReasonUnset()
def getReason(self):
return self.statePair.reason
@@ -276,4 +275,8 @@
def isNotOk(self):
return self.statePair.isNotOk()
+
+ def okToPerformWork(self):
+ return self.statePair.okToPerformWork()
+
Modified: gump/live/python/gump/process/launcher.py
==============================================================================
--- gump/live/python/gump/process/launcher.py (original)
+++ gump/live/python/gump/process/launcher.py Tue Aug 24 12:25:34 2004
@@ -93,9 +93,9 @@
' >>' + str(outputFile) + ' 2>&1'
log.debug('Executing: ' + execString)
- log.debug(' Exec: ' + str(execFile))
- log.debug(' Output: ' + str(outputFile))
- log.debug('Full Exec: ' + fullExec)
+ #log.debug(' Exec: ' + str(execFile))
+ #log.debug(' Output: ' + str(outputFile))
+ #log.debug('Full Exec: ' + fullExec)
# Execute Command & Wait
systemReturn=os.system(fullExec)
@@ -118,7 +118,7 @@
result.signal=0
result.exit_code=systemReturn
- log.debug('Command returned [' + str(systemReturn)+ '] [Sig:' + str(result.signal) + ' / Exit:' + str(result.exit_code) + '].')
+ #log.debug('Command returned [' + str(systemReturn)+ '] [Sig:' + str(result.signal) + ' / Exit:' + str(result.exit_code) + '].')
#
# Assume timed out if signal terminated
Modified: gump/live/python/gump/repository/artifact.py
==============================================================================
--- gump/live/python/gump/repository/artifact.py (original)
+++ gump/live/python/gump/repository/artifact.py Tue Aug 24 12:25:34 2004
@@ -27,8 +27,13 @@
from shutil import copyfile
+import re
class ArtifactRepository:
+
+ # Match {id}-gump-{date}.{extn} id=1, date=2, extn=3
+ ARTIFACT_RE=re.compile(r'^(.*)-gump-([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]).(.*)$')
+
"""
Represents a local (Gump produced) Artifacts Repository
"""
@@ -57,12 +62,13 @@
if not os.path.exists(rdir): os.makedirs(rdir)
return rdir
- #
- # Repository format is:
- #
- # ../{group}/jars/{output files}
- #
- def getGroupDir(self,group,rdir=None):
+ def _getGroupDir(self,group,rdir=None):
+ """
+ Repository format is:
+
+ .../{group}/jars/{output files}
+
+ """
if not rdir: rdir=self.getRepositoryDir()
gdir=os.path.abspath(os.path.join(rdir,group))
if not os.path.exists(gdir): os.makedirs(gdir)
@@ -70,10 +76,38 @@
if not os.path.exists(jdir): os.makedirs(jdir)
return jdir
+ def getGroups(self):
+ """
+ Get all groups in the repository
+ """
+ return os.listdir(self.getRepositoryDir())
+
+ def cleanRepository(self):
+ for group in self.getGroups():
+ try:
+ self.cleanRepositoryGroup(group)
+ except:
+ pass
+
+ def cleanRepositoryGroup(self,group):
+ recent=self.extractMostRecentGroup(group)
+ if recent:
+
+ # Locate (and make if needed) group.
+ gdir=self._getGroupDir(group)
+
+ for file in os.listdir(gdir):
+ match=ArtifactRepository.ARTIFACT_RE.match(file)
+ if match and not match.group(1) in recent.keys():
+ print 'remove : ' + file
+
def publish(self,group,artifact,id=None):
+ """
+ Publish an artifact ot the artifact repository.
+ """
# Locate (and make if needed) group.
- cdir=self.getGroupDir(group)
+ gdir=self.getGroupDir(group)
# Extract name, to make relative to group
artifactName=os.path.basename(artifact)
@@ -86,10 +120,56 @@
(artifactRoot, artifactExtn) = os.path.splitext(artifactName)
artifactName=id + '-gump-' + default.date_s + artifactExtn
- newArtifact=os.path.join(cdir,artifactName)
+ newArtifact=os.path.join(gdir,artifactName)
# Do the file transfer..
copyfile(artifact,newArtifact)
log.info('Published %s to repository as %s at %s' % (artifact,artifactName, newArtifact))
-
\ No newline at end of file
+
+
+ def extractGroup(self,group):
+ """
+ Get all the sets of identifiers in this group
+
+ Returns a tuple:
+
+ 1) map of list of tuples (id,date,extn,full name), keyed by date (string).
+ 2) the latest date (most recent)
+
+ """
+
+ # Locate (and make if needed) group.
+ gdir=self._getGroupDir(group)
+
+ # See what we have
+ dates={}
+ mostRecent=''
+ for file in os.listdir(gdir):
+ match=ArtifactRepository.ARTIFACT_RE.match(file)
+ if match:
+ # Extract the pieces....
+ id=match.group(1)
+ date=match.group(2)
+ extn=match.group(3)
+
+ # Group by date
+ if not dates.has_key(date):
+ dates[date]={}
+ dates[date][id]=(id,date,extn,match.group(0))
+
+ # Keep track of latest...
+ if date > mostRecent:
+ mostRecent=date
+
+ return (dates, mostRecent)
+
+ def extractMostRecentGroup(self,group):
+ """
+ Get the newest set
+
+ Returns a list of tuples (id,date,extn,full name)
+ """
+ (dates,mostRecent)=self.extractGroup(group)
+ if dates: return dates[mostRecent]
+
\ No newline at end of file
Modified: gump/live/python/gump/repository/publisher.py
==============================================================================
--- gump/live/python/gump/repository/publisher.py (original)
+++ gump/live/python/gump/repository/publisher.py Tue Aug 24 12:25:34 2004
@@ -47,7 +47,7 @@
"""
if project.okToPerformWork() and project.hasOutputs() and project.isRedistributable():
- groupName = project.getModule().getName()
+ groupName = project.getArtifactGroup()
# If we have a <license name='...
if project.hasLicense():
@@ -80,5 +80,13 @@
self.repository.getGroupDir(groupName),
gump.utils.file.FILE_TYPE_REPO,
'list_repo_'+project.getName())
+
+ else:
+ ok = project.okToPerformWork()
+ has = project.hasOutputs()
+ redist = project.isRedistributable()
+
+ log.debug('Not publishing because [ok=%s,has outputs=%s,redistributable=%s]' \
+ % (ok,has,redist))
Modified: gump/live/python/gump/run/gumprun.py
==============================================================================
--- gump/live/python/gump/run/gumprun.py (original)
+++ gump/live/python/gump/run/gumprun.py Tue Aug 24 12:25:34 2004
@@ -164,13 +164,19 @@
log.debug('Register Actor : ' + `actor`)
self.actors.append(actor)
+ def logActors(self):
+ log.debug('There are %s registered actors : ' % len(self.actors))
+ for actor in self.actors:
+ log.debug('Registered Actor : ' + `actor`)
+
+
def _dispatchEvent(self,event):
"""
Perform the dispatch
"""
log.debug('Dispatch Event : ' + `event`)
for actor in self.actors:
- log.debug('Dispatch Event : ' + `event` + ' to ' + `actor`)
+ #log.debug('Dispatch Event : ' + `event` + ' to ' + `actor`)
actor._processEvent(event)
gump.utils.inspectGarbageCollection(`event`)
@@ -180,7 +186,7 @@
"""
log.debug('Dispatch Request : ' + `request`)
for actor in self.actors:
- log.debug('Dispatch Request : ' + `request` + ' to ' + `actor`)
+ #log.debug('Dispatch Request : ' + `request` + ' to ' + `actor`)
actor._processRequest(request)
gump.utils.inspectGarbageCollection(`request`)
Modified: gump/live/python/gump/run/options.py
==============================================================================
--- gump/live/python/gump/run/options.py (original)
+++ gump/live/python/gump/run/options.py Tue Aug 24 12:25:34 2004
@@ -65,7 +65,7 @@
FEATURE_PUBLISH=0x20
FEATURE_DOCUMENT=0x40
-FEATURE_DEFAULT=FEATURE_DOCUMENT
+FEATURE_DEFAULT=FEATURE_SYNDICATE|FEATURE_DOCUMENT|FEATURE_NOTIFY
FEATURE_ALL=FEATURE_STATISTICS|FEATURE_RESULTS|FEATURE_NOTIFY|FEATURE_DIAGRAM| \
FEATURE_SYNDICATE|FEATURE_PUBLISH|FEATURE_DOCUMENT
Modified: gump/live/python/gump/runner/demand.py
==============================================================================
--- gump/live/python/gump/runner/demand.py (original)
+++ gump/live/python/gump/runner/demand.py Tue Aug 24 12:25:34 2004
@@ -189,7 +189,7 @@
if gumpOptions.isUpdate():
# W/ multiple project in one module, it may be done
if not module.isUpdated():
- log.debug('Update module *inlined* ' + `module` + '.')
+ log.debug('Update module *inlined* (not in background thread) ' + `module` + '.')
inlined+=1
self.performUpdate(module)
Modified: gump/live/python/gump/runner/runner.py
==============================================================================
--- gump/live/python/gump/runner/runner.py (original)
+++ gump/live/python/gump/runner/runner.py Tue Aug 24 12:25:34 2004
@@ -29,6 +29,7 @@
from gump.document.text.documenter import TextDocumenter
from gump.document.xdocs.documenter import XDocDocumenter
+from gump.document.xdocs.synchronizer import Synchronizer
from gump.timing.keeper import TimeKeeper
from gump.stats.statistician import Statistician
@@ -140,10 +141,12 @@
# Document..
# Use XDOCS if not overridden...
+ xdocs=False
documenter=None
if self.run.getOptions().isText() :
documenter=TextDocumenter(self.run)
else:
+ xdocs=True
documenter=XDocDocumenter( self.run, \
self.run.getWorkspace().getBaseDirectory(), \
self.run.getWorkspace().getLogUrl())
@@ -157,11 +160,19 @@
# Publish artifacts
if self.run.getOptions().isPublish():
self.run.registerActor(RepositoryPublisher(self.run))
-
+
+ # Synchonize
+ if xdocs:
+ self.run.registerActor(Synchronizer(self.run,documenter))
+
# Notify last
if self.run.getOptions().isNotify() and self.run.getWorkspace().isNotify():
self.run.registerActor(Notifier(self.run))
+
+ # See what we have...
+ self.run.logActors()
+
def finalize(self):
# About to shutdown...
self.run._dispatchEvent(FinalizeRunEvent(self.run))
Modified: gump/live/python/gump/syndication/atom.py
==============================================================================
--- gump/live/python/gump/syndication/atom.py (original)
+++ gump/live/python/gump/syndication/atom.py Tue Aug 24 12:25:34 2004
@@ -111,7 +111,7 @@
""")
def serialize(self):
- log.debug("Atom News Feed to : " + self.file);
+ log.info("Atom News Feed to : " + self.file);
stream = open(self.file,'w')
modified=time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())
@@ -136,7 +136,7 @@
self.feed=AtomFeed(feedUrl,feedFile, \
'workspace', \
'Apache Gump', \
- self.workspace.logurl, \
+ self.workspace.getLogUrl(), \
"""Life is like a box of chocolates""")
def completeRun(self):
Modified: gump/live/python/gump/syndication/rss.py
==============================================================================
--- gump/live/python/gump/syndication/rss.py (original)
+++ gump/live/python/gump/syndication/rss.py Tue Aug 24 12:25:34 2004
@@ -193,10 +193,10 @@
def endRSS(self):
# complete the rss feed
self.rssStream.write('</rss>\n')
- log.debug("RSS Newsfeed written to : " + self.rssFile);
+ log.info("RSS Newsfeed written to : " + self.rssFile);
def serialize(self):
- log.debug("RSS Newsfeed to : " + self.rssFile);
+ log.info("RSS Newsfeed to : " + self.rssFile);
self.rssStream = open(self.rssFile,'w')
self.startRSS()
@@ -235,7 +235,7 @@
self.rss=RSS(self.rssUrl,self.rssFile, \
Channel('Apache Gump', \
- self.workspace.logurl, \
+ self.workspace.getLogUrl(), \
"""Life is like a box of chocolates""", \
self.gumpImage))
Modified: gump/live/python/gump/test/artifacts.py
==============================================================================
--- gump/live/python/gump/test/artifacts.py (original)
+++ gump/live/python/gump/test/artifacts.py Tue Aug 24 12:25:34 2004
@@ -62,4 +62,40 @@
def testPublisher(self):
p=gump.repository.publisher.RepositoryPublisher(self.run)
p.processProject(self.workspace.getProject('project1'))
-
\ No newline at end of file
+
+ def testRepositoryExtract(self):
+ # Create a repository & populate it
+ self.repo=gump.repository.artifact.ArtifactRepository(self.testRepo)
+ self.testPublishJar()
+
+ (dated, latest)=self.repo.extractGroup('testGroup')
+
+ self.assertNotNone('Extracted something', dated)
+ self.assertNotEmpty('Extracted something', dated)
+
+ def testRepositoryExtract2(self):
+ # Create a repository & populate it
+ self.repo=gump.repository.artifact.ArtifactRepository(self.testRepo)
+
+ gdir=self.repo._getGroupDir('test')
+
+ file(os.path.join(gdir,'id1-gump-20030221.jar'),'w').close()
+ file(os.path.join(gdir,'id1-gump-20040221.jar'),'w').close()
+ file(os.path.join(gdir,'id1-gump-20050221.jar'),'w').close()
+ file(os.path.join(gdir,'id2-gump-20030221.jar'),'w').close()
+ file(os.path.join(gdir,'id2-gump-20040221.jar'),'w').close()
+ file(os.path.join(gdir,'id2-gump-20050221.jar'),'w').close()
+ file(os.path.join(gdir,'id3-gump-20030221.jar'),'w').close()
+ file(os.path.join(gdir,'id3-gump-20040221.jar'),'w').close()
+ file(os.path.join(gdir,'id3-gump-20050221.jar'),'w').close()
+ file(os.path.join(gdir,'id4-gump-20050221.jar'),'w').close()
+
+ (dated, latest)=self.repo.extractGroup('test')
+
+ import pprint
+ pprint.pprint(dated)
+
+ self.assertNotNone('Extracted something', dated)
+ self.assertEqual('Extracted correct groups', len(dated.keys()), 3)
+ self.assertEqual('Detected correct latest', latest, '20050221')
+
\ No newline at end of file
Modified: gump/live/python/gump/update/artifact.py
==============================================================================
--- gump/live/python/gump/update/artifact.py (original)
+++ gump/live/python/gump/update/artifact.py Tue Aug 24 12:25:34 2004
@@ -111,8 +111,8 @@
#
# Prepare Artifact checkout/update command...
#
- cmd=Cmd(getDepotUpdateCmd(), \
- 'update_'+module.getName(), \
+ cmd=Cmd(getDepotUpdateCmd(),
+ 'update_'+module.getName(),
module.getWorkspace().cvsdir)
# Be 'quiet' (but not silent) unless requested otherwise.
@@ -124,16 +124,16 @@
# The URL (ought be optional)
if url:
- cmd.addParameter('-r')
- cmd.addParameter(url)
-
+ cmd.addParameter('-r',url)
+ else:
+ # :TODO: Maybe dodgy...
+ cmd.addParameter('-rs','gump')
+
# Group (mandatory)
- cmd.addParameter('-g')
- cmd.addParameter(group)
+ cmd.addParameter('-g',group)
# Target
- cmd.addParameter('-t')
- cmd.addParameter(module.getName())
+ cmd.addParameter('-t',module.getName())
return cmd
Modified: gump/live/python/gump/update/cvs.py
==============================================================================
--- gump/live/python/gump/update/cvs.py (original)
+++ gump/live/python/gump/update/cvs.py Tue Aug 24 12:25:34 2004
@@ -1,6 +1,5 @@
#!/usr/bin/python
-
# Copyright 2003-2004 The Apache Software Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -65,8 +64,8 @@
"""
- log.info('Perform CVS Update on #[' + `module.getPosition()` + \
- '] : ' + module.getName())
+ #log.info('Perform CVS Update on #[' + `module.getPosition()` + \
+ # '] : ' + module.getName())
# Did we 'CVS checkout' already?
exists = os.path.exists(module.getSourceControlStagingDirectory())
@@ -105,11 +104,9 @@
# Get the Update Command
(repository, root, cmd ) = self.getUpdateCommand(module, exists)
- log.debug("CVS Update Module " + module.getName() + \
- ", Repository Name: " + str(module.repository.getName()))
+ #log.debug("CVS Update Module " + module.getName() + \
+ # ", Repository Name: " + str(module.repository.getName()))
- log.debug("CVS Root " + root + " on Repository: " + module.repository.getName())
-
# Provide CVS logins, if not already there
loginToRepositoryOnDemand(repository,root,self.logins)
@@ -125,7 +122,8 @@
# Update Context w/ Results
if not cmdResult.isOk():
- log.error('Failed to checkout/update module: ' + module.name)
+ log.error('Failed w/ CVS Root ' + root + ' for %s on Repository %s.' \
+ % (module.name, module.repository.getName()))
if not exists:
module.changeState(STATE_FAILED,REASON_UPDATE_FAILED)
else:
Modified: gump/live/python/gump/utils/sync.py
==============================================================================
--- gump/live/python/gump/utils/sync.py (original)
+++ gump/live/python/gump/utils/sync.py Tue Aug 24 12:25:34 2004
@@ -57,8 +57,8 @@
self.cleanupActions=False
def execute(self):
- log.debug('Starting %s from [%s]' % (self.actionString,self.sourcedir))
- log.debug(' target dir [' + self.targetdir + ']')
+ #log.debug('Starting %s from [%s]' % (self.actionString,self.sourcedir))
+ #log.debug(' target dir [' + self.targetdir + ']')
# Allow user to pass an open stream, or a filename
# In later case control open/close.
@@ -66,7 +66,7 @@
if self.output:
if isinstance(self.output,types.StringTypes):
doClose=1
- log.debug(' changes to [' + self.output + ']')
+ #log.debug(' changes to [' + self.output + ']')
self.outputStream=open(self.output,'w')
else:
self.outputStream=self.output
@@ -104,7 +104,7 @@
if not os.path.getsize(self.output) > 0:
try:
os.remove(self.output)
- log.debug('No changes, removed [' + self.output + ']')
+ #log.debug('No changes, removed [' + self.output + ']')
except: pass
return (self.actionsOccured, self.inboundActions, self.cleanupActions)
Modified: gump/live/python/gump/utils/work.py
==============================================================================
--- gump/live/python/gump/utils/work.py (original)
+++ gump/live/python/gump/utils/work.py Tue Aug 24 12:25:34 2004
@@ -277,10 +277,7 @@
return self.worklist
def performedWork(self,item):
- self.worklist.add(item)
-
- def okToPerformWork(self):
- return self.isUnset() or self.isSuccess()
+ self.worklist.add(item)
def hasStart(self):
return self.worklist.hasStart()
Modified: gump/live/python/header.txt
==============================================================================
--- gump/live/python/header.txt (original)
+++ gump/live/python/header.txt Tue Aug 24 12:25:34 2004
@@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-# $Header: /home/stefano/cvs/gump/python/header.txt,v 1.2 2004/04/12 18:57:37 ajack Exp $
-#
+__revision__ = "$Rev$"
+__date__ = "$Date$"
+__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
+__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
RE: svn commit: rev 36821 - in gump/live
Posted by "Adam R. B. Jack" <aj...@apache.org>.
> On Wed, 25 Aug 2004, Stephen McConnell wrote:
>
>> It seems like this commit may have broken something somewhere.
>
Yup, spot on. I'm finding this change (build from repository when failed in
proper build) hard to test, and (like all stuff in Python) untested lines/
characters of code are a time bomb. The 'test' workspace ought have found
this before I moved to 'public', but maybe it was just me not paying close
enough attention. I'll fix this now, and pay attention...
regards
Adam
INFO:gump: ------ Perform Artifact Repository Search for : ws-jaxme
Traceback (most recent call last):
File "bin/integrate.py", line 109, in ?
irun()
File "bin/integrate.py", line 86, in irun
result = getRunner(run).perform()
File "/usr/local/gump/public/gump/python/gump/runner/runner.py", line 208, in perform
return self.performRun()
File "/usr/local/gump/public/gump/python/gump/runner/demand.py", line 199, in performRun
self.performBuild(project)
File "/usr/local/gump/public/gump/python/gump/runner/demand.py", line 129, in performBuild
self.builder.buildProject(project)
File "/usr/local/gump/public/gump/python/gump/build/builder.py", line 143, in buildProject
self.extractFromRepository(project, languageHelper)
File "/usr/local/gump/public/gump/python/gump/build/builder.py", line 439, in extractFromRepository
log.info('Utilize %s from Gump artifact repository for id' % (path, id))
TypeError: not all arguments converted during string formatting
Process Exit Code : 1
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
RE: svn commit: rev 36821 - in gump/live
Posted by "Adam R. B. Jack" <aj...@apache.org>.
> Adam:
>
> The Gump runs seem to be completing now following your patches this
> morning. However there does seem to be a problem related to
> notification. The Avalon dev list is kind of flooded with repeated
> notification messages (mostly notifying success which is nice - but it's
> a flood all the same).
I saw some, I wondered if it was my usual case of pine duplicating messages when my modem dies on me. I was fearing it might not be though...
Darn, I guess I broke statistics when I (now) load them from a MySQL database, or something. Thanks for the heads-up.
regards
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
RE: svn commit: rev 36821 - in gump/live
Posted by Stephen McConnell <mc...@apache.org>.
> Gump is currently on 496 of 677. Finger's crossed..
Adam:
The Gump runs seem to be completing now following your patches this
morning. However there does seem to be a problem related to
notification. The Avalon dev list is kind of flooded with repeated
notification messages (mostly notifying success which is nice - but it's
a flood all the same).
Cheers, Steve.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
RE: svn commit: rev 36821 - in gump/live
Posted by Stephen McConnell <mc...@apache.org>.
> -----Original Message-----
> From: Adam R. B. Jack [mailto:ajack@apache.org]
> Sent: 25 August 2004 06:41
> To: Gump code and data
> Subject: RE: svn commit: rev 36821 - in gump/live
>
> > Gump is currently on its third cycle -
> > spinning on whatever is following 269.
>
> It was a project that had previously built, that failed, that Gump was
> attempting to locate artifacts for (in it's repository).
>
> Gump is currently on 496 of 677. Finger's crossed..
This is more exciting than CNN!
Steve.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
RE: svn commit: rev 36821 - in gump/live
Posted by "Adam R. B. Jack" <aj...@apache.org>.
> Gump is currently on its third cycle -
> spinning on whatever is following 269.
It was a project that had previously built, that failed, that Gump was attempting to locate artifacts for (in it's repository).
Gump is currently on 496 of 677. Finger's crossed..
regards
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
RE: svn commit: rev 36821 - in gump/live
Posted by Stephen McConnell <mc...@apache.org>.
> > It seems like this commit may have broken something somewhere.
>
> Thanks for the heads-up, I'll look.
Gump is currently on its third cycle -
spinning on whatever is following 269.
Steve.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
RE: svn commit: rev 36821 - in gump/live
Posted by "Adam R. B. Jack" <aj...@apache.org>.
On Wed, 25 Aug 2004, Stephen McConnell wrote:
> It seems like this commit may have broken something somewhere.
Thanks for the heads-up, I'll look.
regards
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org
RE: svn commit: rev 36821 - in gump/live
Posted by Stephen McConnell <mc...@apache.org>.
> -----Original Message-----
> From: ajack@apache.org [mailto:ajack@apache.org]
> Sent: 24 August 2004 21:26
> To: cvs@gump.apache.org
> Subject: svn commit: rev 36821 - in gump/live: . bin cron python
> python/gump python/gump/admin python/gump/build python/gump/core
> python/gump/document/text python/gump/document/xdocs
> python/gump/integration python/gump/java python/gump/model
> python/gump/process py
Adam:
It seems like this commit may have broken something somewhere. The last
Gump run blocked somewhere after entry 269 in the build cycle following
which Gump reset itself and started a fresh run. As I'm typing we are
back at 269 again and Gump has failed to generate any new info for the
past 18 minutes so I figure its dead.
Steve.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org