You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by aj...@apache.org on 2004/10/11 18:50:03 UTC
svn commit: rev 54600 - in gump/trunk: bin psp python/gump/storage python/gump/util/process
Author: ajack
Date: Mon Oct 11 09:50:02 2004
New Revision: 54600
Added:
gump/trunk/python/gump/storage/READ_ME.txt
Removed:
gump/trunk/psp/
Modified:
gump/trunk/bin/build.py
gump/trunk/bin/check.py
gump/trunk/bin/env.py
gump/trunk/bin/gmp.py
gump/trunk/bin/integrate.py
gump/trunk/bin/preview.py
gump/trunk/bin/redo.py
gump/trunk/bin/repo.py
gump/trunk/bin/update.py
gump/trunk/python/gump/util/process/launcher.py
Log:
More on the re-org.
Modified: gump/trunk/bin/build.py
==============================================================================
--- gump/trunk/bin/build.py (original)
+++ gump/trunk/bin/build.py Mon Oct 11 09:50:02 2004
@@ -1,79 +1,79 @@
-#!/usr/bin/python
-
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# 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.
-
- The workspace is metadata loaded then various
- projects are built. No source control updates
- are performed.
-
-"""
-
-import os.path
-import sys
-
-from gump import log
-from gump.core.gumpinit import gumpinit
-import gump.run.gumprun
-import gump.run.options
-from gump.core.commandLine import handleArgv
-from gump.runner.runner import getRunner
-from gump.loader.loader import WorkspaceLoader
-
-
-###############################################################################
-# Functions
-###############################################################################
-
-# static void main()
-if __name__=='__main__':
- gumpinit()
-
- # Process command line
- (args,options) = handleArgv(sys.argv)
- ws=args[0]
- ps=args[1]
-
- # get parsed workspace definition
- workspace=WorkspaceLoader(options.isCache()).load(ws)
-
- # Ensure we use text, not xdocs...
- options.setText(True)
-
- #
- options.setObjectives(gump.run.options.OBJECTIVE_BUILD)
-
- # The Run Details...
- run=gump.run.gumprun.GumpRun(workspace,ps,options)
-
- #
- # Perform this integration run...
- #
- result = getRunner(run).perform()
-
- #
- log.info('Gump Build complete. Exit code:' + str(result))
-
- # bye!
- sys.exit(result)
\ No newline at end of file
+#!/usr/bin/python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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.
+
+ The workspace is metadata loaded then various
+ projects are built. No source control updates
+ are performed.
+
+"""
+
+import os.path
+import sys
+
+from gump import log
+from gump.core.gumpinit import gumpinit
+import gump.core.run.gumprun
+import gump.core.run.options
+from gump.core.commandLine import handleArgv
+from gump.core.runner.runner import getRunner
+from gump.core.loader.loader import WorkspaceLoader
+
+
+###############################################################################
+# Functions
+###############################################################################
+
+# static void main()
+if __name__=='__main__':
+ gumpinit()
+
+ # Process command line
+ (args,options) = handleArgv(sys.argv)
+ ws=args[0]
+ ps=args[1]
+
+ # get parsed workspace definition
+ workspace=WorkspaceLoader(options.isCache()).load(ws)
+
+ # Ensure we use text, not xdocs...
+ options.setText(True)
+
+ #
+ options.setObjectives(gump.core.run.options.OBJECTIVE_BUILD)
+
+ # The Run Details...
+ run=gump.core.run.gumprun.GumpRun(workspace,ps,options)
+
+ #
+ # Perform this integration run...
+ #
+ result = getRunner(run).perform()
+
+ #
+ log.info('Gump Build complete. Exit code:' + str(result))
+
+ # bye!
+ sys.exit(result)
Modified: gump/trunk/bin/check.py
==============================================================================
--- gump/trunk/bin/check.py (original)
+++ gump/trunk/bin/check.py Mon Oct 11 09:50:02 2004
@@ -1,79 +1,79 @@
-#!/usr/bin/python
-
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# 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.
-
- The workspace is loaded into memory, rudimentary
- checks occur, and the output tree is documented
- (e.g. via forrest).
-
-"""
-
-import os.path
-import sys
-
-from gump import log
-from gump.core.gumpinit import gumpinit
-from gump.runner.runner import getRunner
-import gump.run.options
-import gump.run.gumprun
-from gump.core.commandLine import handleArgv
-from gump.loader.loader import WorkspaceLoader
-
-def crun():
- gumpinit()
-
- # Process command line
- (args,options) = handleArgv(sys.argv)
- ws=args[0]
- ps=args[1]
-
- # get parsed workspace definition
- workspace=WorkspaceLoader(options.isQuick()).load(ws)
-
- #
- options.setObjectives(gump.run.options.OBJECTIVE_CHECK)
-
- # The Run Details...
- run=gump.run.gumprun.GumpRun(workspace,ps,options)
-
- #
- # Perform this check run...
- #
- result = getRunner(run).perform()
-
- #
- log.info('Gump Check complete. Exit code:' + str(result))
-
- # bye!
- sys.exit(result)
-
-
-# static void main()
-if __name__=='__main__':
-
- #print 'Profiling....'
- #import profile
- #profile.run('crun()', 'iprof')
- crun()
-
\ No newline at end of file
+#!/usr/bin/python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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.
+
+ The workspace is loaded into memory, rudimentary
+ checks occur, and the output tree is documented
+ (e.g. via forrest).
+
+"""
+
+import os.path
+import sys
+
+from gump import log
+from gump.core.gumpinit import gumpinit
+from gump.core.runner.runner import getRunner
+import gump.core.run.options
+import gump.core.run.gumprun
+from gump.core.commandLine import handleArgv
+from gump.core.loader.loader import WorkspaceLoader
+
+def crun():
+ gumpinit()
+
+ # Process command line
+ (args,options) = handleArgv(sys.argv)
+ ws=args[0]
+ ps=args[1]
+
+ # get parsed workspace definition
+ workspace=WorkspaceLoader(options.isQuick()).load(ws)
+
+ #
+ options.setObjectives(gump.core.run.options.OBJECTIVE_CHECK)
+
+ # The Run Details...
+ run=gump.core.run.gumprun.GumpRun(workspace,ps,options)
+
+ #
+ # Perform this check run...
+ #
+ result = getRunner(run).perform()
+
+ #
+ log.info('Gump Check complete. Exit code:' + str(result))
+
+ # bye!
+ sys.exit(result)
+
+
+# static void main()
+if __name__=='__main__':
+
+ #print 'Profiling....'
+ #import profile
+ #profile.run('crun()', 'iprof')
+ crun()
+
Modified: gump/trunk/bin/env.py
==============================================================================
--- gump/trunk/bin/env.py (original)
+++ gump/trunk/bin/env.py Mon Oct 11 09:50:02 2004
@@ -1,56 +1,56 @@
-#!/usr/bin/python
-
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# 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.
-"""
-
-import os.path
-import sys
-
-from gump import log
-from gump.core.gumpinit import gumpinit
-from gump.run.gumpenv import GumpEnvironment
-from gump.core.commandLine import handleArgv
-
-# static void main()
-if __name__=='__main__':
- gumpinit()
-
- # Process command line
- (args,options) = handleArgv(sys.argv)
- ws=args[0]
- ps=args[1]
-
-
- #
- # Perform this check run...
- #
- result = 1
-
- GumpEnvironment().checkEnvironment(True)
-
- #
- log.info('Gump Environment Check complete. Exit code:' + str(result))
-
- # bye!
- sys.exit(result)
\ No newline at end of file
+#!/usr/bin/python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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.
+"""
+
+import os.path
+import sys
+
+from gump import log
+from gump.core.gumpinit import gumpinit
+from gump.core.run.gumpenv import GumpEnvironment
+from gump.core.commandLine import handleArgv
+
+# static void main()
+if __name__=='__main__':
+ gumpinit()
+
+ # Process command line
+ (args,options) = handleArgv(sys.argv)
+ ws=args[0]
+ ps=args[1]
+
+
+ #
+ # Perform this check run...
+ #
+ result = 1
+
+ GumpEnvironment().checkEnvironment(True)
+
+ #
+ log.info('Gump Environment Check complete. Exit code:' + str(result))
+
+ # bye!
+ sys.exit(result)
Modified: gump/trunk/bin/gmp.py
==============================================================================
--- gump/trunk/bin/gmp.py (original)
+++ gump/trunk/bin/gmp.py Mon Oct 11 09:50:02 2004
@@ -1,213 +1,213 @@
-#!/bin/bash
-#
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# $Header: /home/stefano/cvs/gump/python/gmp.py,v 1.8 2004/04/26 01:00:33 ajack Exp $
-
-"""
- This is the commandline entrypoint into Python Gump as a
- build system (as opposed to a cronned CI tool).
-
- It works similarly to "cvs", as it needs to be given the action
- to do, and it needs to be run in the correct directory
- (workspace or project).
-"""
-
-import os.path
-import os
-import sys
-import socket
-import time
-import signal
-import smtplib
-import StringIO
-from xml.dom import minidom
-
-def runCommand(command,args='',dir=None,outputFile=None):
- """ Run a command, and check the result... """
-
- #
- originalCWD=None
- if dir:
- originalCWD=os.getcwd()
- cwdpath=os.path.abspath(dir)
- try:
- if not os.path.exists(cwdpath): os.makedirs(dir)
- os.chdir(cwdpath)
- except Exception, details :
- # Log the problem and re-raise
- return 0
-
- try:
-
- fullCommand = command + ' ' + args
-
- #
- # Execute Command & Calculate Exit Code
- #
- systemReturn=os.system(fullCommand)
-
- if not os.name == 'dos' and not os.name == 'nt':
- waitcode=systemReturn
-
- #
- # The return code (from system = from wait) is (on Unix):
- #
- # a 16 bit number
- # top byte = exit status
- # low byte = signal that killed it
- #
- exit_code=(((waitcode & 0xFF00) >> 8) & 0xFF)
-
- else:
- exit_code=systemReturn
-
- finally:
- if originalCWD: os.chdir(originalCWD)
-
- return exit_code
-
-def callGmpCommand(ws,command,projects,iargs):
-
- iargs+=' --text'
-
- #
- # Actually run the Gump command
- #
- command=os.path.join(os.environ['GUMP_HOME'],'bin/'+command+'.py')
-
- exitValue = runCommand('python '+command+' -w '+ws+' '+projects, iargs)
-
- return exitValue
-
-
-if not os.environ.has_key('GUMP_HOME'):
- print 'Please set GUMP_HOME to where Gump (SVN code) is installed.'
- sys.exit(1)
-
-# Allow a lock
-lockFile=os.path.abspath('gmp.lock')
-if os.path.exists(lockFile):
- # :TODO: Ought we look at the contents, get the PID of the
- # supposed other Gump, and determine if it is still alive
- # or not?
- print """The lock file [%s] exists.
-Either Gump is still running, or it terminated very abnormally.
-Please resolve this (waiting or removing the lock file) before retrying.
- """ % lockFile
- sys.exit(1)
-
-# Write this PID into a lock file
-lock=open(lockFile,'w')
-lock.write(`os.getpid()`)
-lock.close()
-
-result=0
-
-args=sys.argv
-try:
- # print 'Apache Gump (A multi-project builder)'
-
- try:
- # Process Environment
- hostname = socket.gethostname()
-
- # The path of this command
- gmpPath = os.path.abspath(args[0])
- del args[0]
-
- # Workspace is the `hostname`.xml or workspace.xml,
- # unless overridden
- workspaceName = hostname + '.xml'
- if not os.path.exists(os.path.abspath(workspaceName)):
- workspaceName='workspace.xml'
-
- if os.environ.has_key('GUMP_WORKSPACE'):
- workspaceName = os.environ['GUMP_WORKSPACE'] + '.xml'
- if len(args)>2 and args[1] in ['-w','--workspace']:
- workspaceName=args[2]
- del args[1:3]
- workspacePath = os.path.abspath(workspaceName)
-
- # Nope, can't find the workspace...
- if not os.path.exists(workspacePath):
- raise RuntimeError('No such workspace at ' + str(workspacePath))
-
- # Command has to be given
- if len(args)>0:
- command=args[0]
- del args[0]
- else:
- raise RuntimeError('Must supply a Gump command')
-
- # Projects to be built are 'all', unless overridden
- projectsExpr='all'
- if len(args)>0:
- projectsExpr=args[0]
- del args[0]
-
- #flatten the remaining args
- iargs=''
- for i in args:
- iargs+=(i+' ')
-
- #
- # Process the workspace...
- #
- ws = minidom.parse(workspacePath)
- workspaceElementList=ws.getElementsByTagName('workspace')
- if not workspaceElementList.length == 1:
- raise RuntimeError('Need one (only) <workspace> tag. Found ' + \
- ` workspaceElementList.length` + '.')
- wsw=workspaceElementList.item(0)
- wsName=wsw.getAttribute('name')
- # Extract the base directory
- baseDir=wsw.getAttribute('basedir')
- basePath=os.path.abspath(baseDir)
- # Log (site) location(s)
- logurl=wsw.getAttribute('logurl')
- logdir=wsw.getAttribute('logdir') or os.path.join(basePath,'log')
- # Finish parsing
- ws.unlink()
-
- #
- # Add Gump to Python Path...
- #
- pythonPath=''
- if os.environ.has_key('PYTHONPATH'):
- pythonPath=os.environ['PYTHONPATH']
- pythonPath+=os.pathsep
- pythonPath+=str(os.path.abspath(os.path.join(os.environ['GUMP_HOME'],'python')))
- os.environ['PYTHONPATH']=pythonPath
-
- result=callGmpCommand(workspacePath,command,projectsExpr,iargs)
-
- except KeyboardInterrupt:
- print 'Terminated by user interrupt...'
- result = 1
- raise
-
- except:
- print 'Terminated unintentionally...'
- result = 1
- raise
-
-finally:
- # :TODO: We have issues when python is killed, we get a lock
- # left around despite this finally.
- os.remove(lockFile)
-
-# bye!
-sys.exit(result)
+#!/bin/bash
+#
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# $Header: /home/stefano/cvs/gump/python/gmp.py,v 1.8 2004/04/26 01:00:33 ajack Exp $
+
+"""
+ This is the commandline entrypoint into Python Gump as a
+ build system (as opposed to a cronned CI tool).
+
+ It works similarly to "cvs", as it needs to be given the action
+ to do, and it needs to be run in the correct directory
+ (workspace or project).
+"""
+
+import os.path
+import os
+import sys
+import socket
+import time
+import signal
+import smtplib
+import StringIO
+from xml.dom import minidom
+
+def runCommand(command,args='',dir=None,outputFile=None):
+ """ Run a command, and check the result... """
+
+ #
+ originalCWD=None
+ if dir:
+ originalCWD=os.getcwd()
+ cwdpath=os.path.abspath(dir)
+ try:
+ if not os.path.exists(cwdpath): os.makedirs(dir)
+ os.chdir(cwdpath)
+ except Exception, details :
+ # Log the problem and re-raise
+ return 0
+
+ try:
+
+ fullCommand = command + ' ' + args
+
+ #
+ # Execute Command & Calculate Exit Code
+ #
+ systemReturn=os.system(fullCommand)
+
+ if not os.name == 'dos' and not os.name == 'nt':
+ waitcode=systemReturn
+
+ #
+ # The return code (from system = from wait) is (on Unix):
+ #
+ # a 16 bit number
+ # top byte = exit status
+ # low byte = signal that killed it
+ #
+ exit_code=(((waitcode & 0xFF00) >> 8) & 0xFF)
+
+ else:
+ exit_code=systemReturn
+
+ finally:
+ if originalCWD: os.chdir(originalCWD)
+
+ return exit_code
+
+def callGmpCommand(ws,command,projects,iargs):
+
+ iargs+=' --text'
+
+ #
+ # Actually run the Gump command
+ #
+ command=os.path.join(os.environ['GUMP_HOME'],'bin/'+command+'.py')
+
+ exitValue = runCommand('python '+command+' -w '+ws+' '+projects, iargs)
+
+ return exitValue
+
+
+if not os.environ.has_key('GUMP_HOME'):
+ print 'Please set GUMP_HOME to where Gump (SVN code) is installed.'
+ sys.exit(1)
+
+# Allow a lock
+lockFile=os.path.abspath('gmp.lock')
+if os.path.exists(lockFile):
+ # :TODO: Ought we look at the contents, get the PID of the
+ # supposed other Gump, and determine if it is still alive
+ # or not?
+ print """The lock file [%s] exists.
+Either Gump is still running, or it terminated very abnormally.
+Please resolve this (waiting or removing the lock file) before retrying.
+ """ % lockFile
+ sys.exit(1)
+
+# Write this PID into a lock file
+lock=open(lockFile,'w')
+lock.write(`os.getpid()`)
+lock.close()
+
+result=0
+
+args=sys.argv
+try:
+ # print 'Apache Gump (A multi-project builder)'
+
+ try:
+ # Process Environment
+ hostname = socket.gethostname()
+
+ # The path of this command
+ gmpPath = os.path.abspath(args[0])
+ del args[0]
+
+ # Workspace is the `hostname`.xml or workspace.xml,
+ # unless overridden
+ workspaceName = hostname + '.xml'
+ if not os.path.exists(os.path.abspath(workspaceName)):
+ workspaceName='workspace.xml'
+
+ if os.environ.has_key('GUMP_WORKSPACE'):
+ workspaceName = os.environ['GUMP_WORKSPACE'] + '.xml'
+ if len(args)>2 and args[1] in ['-w','--workspace']:
+ workspaceName=args[2]
+ del args[1:3]
+ workspacePath = os.path.abspath(workspaceName)
+
+ # Nope, can't find the workspace...
+ if not os.path.exists(workspacePath):
+ raise RuntimeError('No such workspace at ' + str(workspacePath))
+
+ # Command has to be given
+ if len(args)>0:
+ command=args[0]
+ del args[0]
+ else:
+ raise RuntimeError('Must supply a Gump command')
+
+ # Projects to be built are 'all', unless overridden
+ projectsExpr='all'
+ if len(args)>0:
+ projectsExpr=args[0]
+ del args[0]
+
+ #flatten the remaining args
+ iargs=''
+ for i in args:
+ iargs+=(i+' ')
+
+ #
+ # Process the workspace...
+ #
+ ws = minidom.parse(workspacePath)
+ workspaceElementList=ws.getElementsByTagName('workspace')
+ if not workspaceElementList.length == 1:
+ raise RuntimeError('Need one (only) <workspace> tag. Found ' + \
+ ` workspaceElementList.length` + '.')
+ wsw=workspaceElementList.item(0)
+ wsName=wsw.getAttribute('name')
+ # Extract the base directory
+ baseDir=wsw.getAttribute('basedir')
+ basePath=os.path.abspath(baseDir)
+ # Log (site) location(s)
+ logurl=wsw.getAttribute('logurl')
+ logdir=wsw.getAttribute('logdir') or os.path.join(basePath,'log')
+ # Finish parsing
+ ws.unlink()
+
+ #
+ # Add Gump to Python Path...
+ #
+ pythonPath=''
+ if os.environ.has_key('PYTHONPATH'):
+ pythonPath=os.environ['PYTHONPATH']
+ pythonPath+=os.pathsep
+ pythonPath+=str(os.path.abspath(os.path.join(os.environ['GUMP_HOME'],'python')))
+ os.environ['PYTHONPATH']=pythonPath
+
+ result=callGmpCommand(workspacePath,command,projectsExpr,iargs)
+
+ except KeyboardInterrupt:
+ print 'Terminated by user interrupt...'
+ result = 1
+ raise
+
+ except:
+ print 'Terminated unintentionally...'
+ result = 1
+ raise
+
+finally:
+ # :TODO: We have issues when python is killed, we get a lock
+ # left around despite this finally.
+ os.remove(lockFile)
+
+# bye!
+sys.exit(result)
Modified: gump/trunk/bin/integrate.py
==============================================================================
--- gump/trunk/bin/integrate.py (original)
+++ gump/trunk/bin/integrate.py Mon Oct 11 09:50:02 2004
@@ -1,109 +1,109 @@
-#!/usr/bin/env python
-
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# 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 $
-#
-
-"""
- This is the main commandline entrypoint into gump.
-
- It updates modules/projects, builds, and publishes results
-
-"""
-
-import os.path
-import os
-import sys
-
-from gump import log
-from gump.core.gumpinit import gumpinit
-from gump.runner.runner import getRunner
-import gump.run.options
-import gump.run.gumprun
-from gump.core.commandLine import handleArgv
-from gump.utils import logResourceUtilization
-from gump.loader.loader import WorkspaceLoader
-
-
-###############################################################################
-# Initialize
-###############################################################################
-
-###############################################################################
-# Functions
-###############################################################################
-
-def ignoreHangup(signum):
- pass
-
-def irun():
-
- gumpinit()
-
- # Process command line
- (args,options) = handleArgv(sys.argv)
- ws=args[0]
- ps=args[1]
-
- logResourceUtilization('Before load workspace')
-
- # get parsed workspace definition
- workspace=WorkspaceLoader(False).load(ws)
-
- logResourceUtilization('Before create run')
-
- # Has to be absolute latest descriptors, not quick/cached...
- options.setQuick(False)
- options.setCache(False)
-
- #
- options.setObjectives(gump.run.options.OBJECTIVE_INTEGRATE)
-
- # The Run Details...
- run=gump.run.gumprun.GumpRun(workspace,ps,options)
-
- # Perform this integration run...
- result = getRunner(run).perform()
-
- logResourceUtilization('Before exit')
-
- #
- log.info('Gump Integration complete. Exit code [0=SUCCESS] : ' + str(result))
-
- # bye!
- sys.exit(result)
-
-# static void main()
-if __name__=='__main__':
-
- # Set the signal handler to ignore hangups
- try:
- # Not supported by all OSs
- signal.signal(signal.SIG_HUP, ignoreHangup)
- except:
- pass
-
- #print 'Profiling....'
- #import profile
- #profile.run('irun()', 'iprof')
- irun()
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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 $
+#
+
+"""
+ This is the main commandline entrypoint into gump.
+
+ It updates modules/projects, builds, and publishes results
+
+"""
+
+import os.path
+import os
+import sys
+
+from gump import log
+from gump.core.gumpinit import gumpinit
+from gump.core.runner.runner import getRunner
+import gump.core.run.options
+import gump.core.run.gumprun
+from gump.core.commandLine import handleArgv
+from gump.util import logResourceUtilization
+from gump.core.loader.loader import WorkspaceLoader
+
+
+###############################################################################
+# Initialize
+###############################################################################
+
+###############################################################################
+# Functions
+###############################################################################
+
+def ignoreHangup(signum):
+ pass
+
+def irun():
+
+ gumpinit()
+
+ # Process command line
+ (args,options) = handleArgv(sys.argv)
+ ws=args[0]
+ ps=args[1]
+
+ logResourceUtilization('Before load workspace')
+
+ # get parsed workspace definition
+ workspace=WorkspaceLoader(False).load(ws)
+
+ logResourceUtilization('Before create run')
+
+ # Has to be absolute latest descriptors, not quick/cached...
+ options.setQuick(False)
+ options.setCache(False)
+
+ #
+ options.setObjectives(gump.core.run.options.OBJECTIVE_INTEGRATE)
+
+ # The Run Details...
+ run=gump.core.run.gumprun.GumpRun(workspace,ps,options)
+
+ # Perform this integration run...
+ result = getRunner(run).perform()
+
+ logResourceUtilization('Before exit')
+
+ #
+ log.info('Gump Integration complete. Exit code [0=SUCCESS] : ' + str(result))
+
+ # bye!
+ sys.exit(result)
+
+# static void main()
+if __name__=='__main__':
+
+ # Set the signal handler to ignore hangups
+ try:
+ # Not supported by all OSs
+ signal.signal(signal.SIG_HUP, ignoreHangup)
+ except:
+ pass
+
+ #print 'Profiling....'
+ #import profile
+ #profile.run('irun()', 'iprof')
+ irun()
Modified: gump/trunk/bin/preview.py
==============================================================================
--- gump/trunk/bin/preview.py (original)
+++ gump/trunk/bin/preview.py Mon Oct 11 09:50:02 2004
@@ -1,137 +1,137 @@
-#!/usr/bin/env python
-
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# 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 $
-#
-
-"""
- This is one commandline entrypoint into Gump.
-
- It loads the workspace, then updates the specified modules.
-
-"""
-
-import os.path
-import os
-import sys
-import logging
-
-from gump import log
-from gump.core.gumpinit import gumpinit
-from gump.run.gumprun import GumpRun
-from gump.run.gumpset import GumpSet
-from gump.run.options import GumpRunOptions
-from gump.core.commandLine import handleArgv
-from gump.loader.loader import WorkspaceLoader
-
-from gump.utils.note import Annotatable
-
-from gump.runner.runner import getRunner
-
-###############################################################################
-# Initialize
-###############################################################################
-
-SEPARATOR='-------------------------------------------------------------'
-
-###############################################################################
-# Functions
-###############################################################################
-
-def prun():
- gumpinit()
-
- # Process command line
- (args,options) = handleArgv(sys.argv)
- ws=args[0]
- ps=args[1]
-
- result=0
-
- # get parsed workspace definition
- workspace=WorkspaceLoader(options.isCache()).load(ws)
-
- # The Run Details...
- run=GumpRun(workspace,ps,options)
- run.dump()
-
- debug=run.getOptions().isDebug()
- verbose=run.getOptions().isVerbose()
-
- # :TODO: Show the environment
-
- if verbose:
- # Show the workings
- runner=getRunner(run)
-
- #
- updater=runner.getUpdater()
- builder=runner.getBuilder()
- languageHelper=runner.getJavaHelper()
-
- for module in run.getGumpSet().getModules():
- print SEPARATOR
- print `module`
- if debug:
- print module.getXml()
- module.dump()
- if module.isUpdatable():
- updater.preview(module)
-
- for project in run.getGumpSet().getProjects():
- print SEPARATOR
- print `project`
- if debug:
- print project.getXml()
- project.dump()
- if project.hasBuilder():
- builder.preview(project, languageHelper)
-
- # Show any nasties...
- if workspace.containsNasties():
- print SEPARATOR
- print `workspace`
- Annotatable.dump(workspace)
- for module in run.getGumpSet().getModules():
- if module.containsNasties():
- print SEPARATOR
- print `module`
- Annotatable.dump(module)
- for project in run.getGumpSet().getProjects():
- if project.containsNasties():
- print SEPARATOR
- print `project`
- Annotatable.dump(project)
-
- # bye!
- sys.exit(result)
-
-
-# static void main()
-if __name__=='__main__':
-
- #print 'Profiling....'
- #import profile
- #profile.run('prun()', 'iprof')
- prun()
-
\ No newline at end of file
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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 $
+#
+
+"""
+ This is one commandline entrypoint into Gump.
+
+ It loads the workspace, then updates the specified modules.
+
+"""
+
+import os.path
+import os
+import sys
+import logging
+
+from gump import log
+from gump.core.gumpinit import gumpinit
+from gump.core.run.gumprun import GumpRun
+from gump.core.run.gumpset import GumpSet
+from gump.core.run.options import GumpRunOptions
+from gump.core.commandLine import handleArgv
+from gump.core.loader.loader import WorkspaceLoader
+
+from gump.util.note import Annotatable
+
+from gump.core.runner.runner import getRunner
+
+###############################################################################
+# Initialize
+###############################################################################
+
+SEPARATOR='-------------------------------------------------------------'
+
+###############################################################################
+# Functions
+###############################################################################
+
+def prun():
+ gumpinit()
+
+ # Process command line
+ (args,options) = handleArgv(sys.argv)
+ ws=args[0]
+ ps=args[1]
+
+ result=0
+
+ # get parsed workspace definition
+ workspace=WorkspaceLoader(options.isCache()).load(ws)
+
+ # The Run Details...
+ run=GumpRun(workspace,ps,options)
+ run.dump()
+
+ debug=run.getOptions().isDebug()
+ verbose=run.getOptions().isVerbose()
+
+ # :TODO: Show the environment
+
+ if verbose:
+ # Show the workings
+ runner=getRunner(run)
+
+ #
+ updater=runner.getUpdater()
+ builder=runner.getBuilder()
+ languageHelper=runner.getJavaHelper()
+
+ for module in run.getGumpSet().getModules():
+ print SEPARATOR
+ print `module`
+ if debug:
+ print module.getXml()
+ module.dump()
+ if module.isUpdatable():
+ updater.preview(module)
+
+ for project in run.getGumpSet().getProjects():
+ print SEPARATOR
+ print `project`
+ if debug:
+ print project.getXml()
+ project.dump()
+ if project.hasBuilder():
+ builder.preview(project, languageHelper)
+
+ # Show any nasties...
+ if workspace.containsNasties():
+ print SEPARATOR
+ print `workspace`
+ Annotatable.dump(workspace)
+ for module in run.getGumpSet().getModules():
+ if module.containsNasties():
+ print SEPARATOR
+ print `module`
+ Annotatable.dump(module)
+ for project in run.getGumpSet().getProjects():
+ if project.containsNasties():
+ print SEPARATOR
+ print `project`
+ Annotatable.dump(project)
+
+ # bye!
+ sys.exit(result)
+
+
+# static void main()
+if __name__=='__main__':
+
+ #print 'Profiling....'
+ #import profile
+ #profile.run('prun()', 'iprof')
+ prun()
+
Modified: gump/trunk/bin/redo.py
==============================================================================
--- gump/trunk/bin/redo.py (original)
+++ gump/trunk/bin/redo.py Mon Oct 11 09:50:02 2004
@@ -1,82 +1,82 @@
-#!/usr/bin/python
-
-
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# 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.
-
- It loads the workspace, then updates the specified modules.
-
-"""
-
-import os.path
-import sys
-import logging
-
-from gump import log
-from gump.core.gumpinit import gumpinit
-from gump.runner.runner import getRunner
-from gump.run.gumprun import *
-from gump.core.commandLine import handleArgv
-from gump.loader.loader import WorkspaceLoader
-
-
-###############################################################################
-# Initialize
-###############################################################################
-
-
-###############################################################################
-# Functions
-###############################################################################
-
-# static void main()
-if __name__=='__main__':
- gumpinit()
-
- # Process command line
- (args,options) = handleArgv(sys.argv)
- ws=args[0]
- ps=args[1]
-
- # get parsed workspace definition
- workspace=WorkspaceLoader(options.isCache()).load(ws)
-
- # Ensure we use text, not xdocs...
- options.setText(True)
-
- #
- options.setObjectives(gump.run.options.OBJECTIVE_REDO)
-
- # The Run Details...
- run=GumpRun(workspace,ps,options)
-
- #
- # Perform this integration run...
- #
- result = getRunner(run).run()
-
- #
- log.info('Gump Debug complete. Exit code:' + str(result))
-
- # bye!
- sys.exit(result)
\ No newline at end of file
+#!/usr/bin/python
+
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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.
+
+ It loads the workspace, then updates the specified modules.
+
+"""
+
+import os.path
+import sys
+import logging
+
+from gump import log
+from gump.core.gumpinit import gumpinit
+from gump.core.runner.runner import getRunner
+from gump.core.run.gumprun import *
+from gump.core.commandLine import handleArgv
+from gump.core.loader.loader import WorkspaceLoader
+
+
+###############################################################################
+# Initialize
+###############################################################################
+
+
+###############################################################################
+# Functions
+###############################################################################
+
+# static void main()
+if __name__=='__main__':
+ gumpinit()
+
+ # Process command line
+ (args,options) = handleArgv(sys.argv)
+ ws=args[0]
+ ps=args[1]
+
+ # get parsed workspace definition
+ workspace=WorkspaceLoader(options.isCache()).load(ws)
+
+ # Ensure we use text, not xdocs...
+ options.setText(True)
+
+ #
+ options.setObjectives(gump.core.run.options.OBJECTIVE_REDO)
+
+ # The Run Details...
+ run=GumpRun(workspace,ps,options)
+
+ #
+ # Perform this integration run...
+ #
+ result = getRunner(run).run()
+
+ #
+ log.info('Gump Debug complete. Exit code:' + str(result))
+
+ # bye!
+ sys.exit(result)
Modified: gump/trunk/bin/repo.py
==============================================================================
--- gump/trunk/bin/repo.py (original)
+++ gump/trunk/bin/repo.py Mon Oct 11 09:50:02 2004
@@ -1,61 +1,61 @@
-#!/usr/bin/python
-
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# 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"
-
-
-"""
- Works on the Gump Repository
-"""
-
-import os.path
-import sys
-import pprint
-
-from gump import log
-from gump.core.gumpinit import gumpinit
-
-import gump.repository.artifact
-
-# static void main()
-if __name__=='__main__':
- gumpinit()
-
- result = 1
-
- if not len(sys.argv) >= 1:
- raise RuntimeError, 'Usage: repo.py \'repo directory\' [\'clean\']'
-
- dir = sys.argv[1]
- clean = len(sys.argv) == 2
-
- if not os.path.exists(dir): raise RuntimeError, 'No such directory : ' + `dir`
- if not os.path.isdir(dir): raise RuntimeError, 'Not a directory : ' + `dir`
-
- repo=gump.repository.artifact.ArtifactRepository(dir)
-
- for group in repo.getGroups():
- print '---------------------------------------------------------'
- print 'Group : ' + group
- pprint.pprint(repo.extractGroup(group))
-
- log.info('Gump Repository Tool Complete. Exit code:' + str(result))
-
- # bye!
- sys.exit(result)
\ No newline at end of file
+#!/usr/bin/python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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"
+
+
+"""
+ Works on the Gump Repository
+"""
+
+import os.path
+import sys
+import pprint
+
+from gump import log
+from gump.core.gumpinit import gumpinit
+
+import gump.repository.artifact
+
+# static void main()
+if __name__=='__main__':
+ gumpinit()
+
+ result = 1
+
+ if not len(sys.argv) >= 1:
+ raise RuntimeError, 'Usage: repo.py \'repo directory\' [\'clean\']'
+
+ dir = sys.argv[1]
+ clean = len(sys.argv) == 2
+
+ if not os.path.exists(dir): raise RuntimeError, 'No such directory : ' + `dir`
+ if not os.path.isdir(dir): raise RuntimeError, 'Not a directory : ' + `dir`
+
+ repo=gump.repository.artifact.ArtifactRepository(dir)
+
+ for group in repo.getGroups():
+ print '---------------------------------------------------------'
+ print 'Group : ' + group
+ pprint.pprint(repo.extractGroup(group))
+
+ log.info('Gump Repository Tool Complete. Exit code:' + str(result))
+
+ # bye!
+ sys.exit(result)
Modified: gump/trunk/bin/update.py
==============================================================================
--- gump/trunk/bin/update.py (original)
+++ gump/trunk/bin/update.py Mon Oct 11 09:50:02 2004
@@ -1,88 +1,88 @@
-#!/usr/bin/env python
-
-# Copyright 2003-2004 The Apache Software Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# 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 $
-#
-
-"""
- This is one commandline entrypoint into Gump.
-
- It loads the workspace, then updates the specified modules.
-
-"""
-
-import os.path
-import os
-import sys
-import logging
-
-from gump import log
-from gump.core.gumpinit import gumpinit
-from gump.runner.runner import getRunner
-import gump.run.options
-from gump.run.gumprun import *
-from gump.core.commandLine import handleArgv
-from gump.loader.loader import WorkspaceLoader
-
-
-###############################################################################
-# Initialize
-###############################################################################
-
-
-###############################################################################
-# Functions
-###############################################################################
-
-# static void main()
-if __name__=='__main__':
-
- gumpinit()
-
- # Process command line
- (args,options) = handleArgv(sys.argv)
- ws=args[0]
- ps=args[1]
-
- # get parsed workspace definition
- workspace=WorkspaceLoader(options.isCache()).load(ws)
-
- # Ensure we use text, not xdocs...
- options.setText(True)
-
- #
- options.setObjectives(gump.run.options.OBJECTIVE_UPDATE)
-
- # The Run Details...
- run=GumpRun(workspace,ps,options)
-
- #
- # Perform this integration run...
- #
- result = getRunner(run).perform()
-
- #
- log.info('Gump Update complete. Exit code:' + str(result))
-
- # bye!
- sys.exit(result)
\ No newline at end of file
+#!/usr/bin/env python
+
+# Copyright 2003-2004 The Apache Software Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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.core.update.py,v 1.31 2004/07/19 16:07:53 ajack Exp $
+#
+
+"""
+ This is one commandline entrypoint into Gump.
+
+ It loads the workspace, then updates the specified modules.
+
+"""
+
+import os.path
+import os
+import sys
+import logging
+
+from gump import log
+from gump.core.gumpinit import gumpinit
+from gump.core.runner.runner import getRunner
+import gump.core.run.options
+from gump.core.run.gumprun import *
+from gump.core.commandLine import handleArgv
+from gump.core.loader.loader import WorkspaceLoader
+
+
+###############################################################################
+# Initialize
+###############################################################################
+
+
+###############################################################################
+# Functions
+###############################################################################
+
+# static void main()
+if __name__=='__main__':
+
+ gumpinit()
+
+ # Process command line
+ (args,options) = handleArgv(sys.argv)
+ ws=args[0]
+ ps=args[1]
+
+ # get parsed workspace definition
+ workspace=WorkspaceLoader(options.isCache()).load(ws)
+
+ # Ensure we use text, not xdocs...
+ options.setText(True)
+
+ #
+ options.setObjectives(gump.core.run.options.OBJECTIVE_UPDATE)
+
+ # The Run Details...
+ run=GumpRun(workspace,ps,options)
+
+ #
+ # Perform this integration run...
+ #
+ result = getRunner(run).perform()
+
+ #
+ log.info('Gump Update complete. Exit code:' + str(result))
+
+ # bye!
+ sys.exit(result)
Added: gump/trunk/python/gump/storage/READ_ME.txt
==============================================================================
--- (empty file)
+++ gump/trunk/python/gump/storage/READ_ME.txt Mon Oct 11 09:50:02 2004
@@ -0,0 +1 @@
+Things in here are kept in storage, and are not currently being worked on.
\ No newline at end of file
Modified: gump/trunk/python/gump/util/process/launcher.py
==============================================================================
--- gump/trunk/python/gump/util/process/launcher.py (original)
+++ gump/trunk/python/gump/util/process/launcher.py Mon Oct 11 09:50:02 2004
@@ -34,7 +34,7 @@
import gump.util.process.command
-LAUNCHER=os.path.join(os.path.join(os.path.join('python','gump'),'process'),'launcher.py')
+LAUNCHER=os.path.join(os.path.join(os.path.join(os.path.join('python','gump'),'util'),'process'),'launcher.py')
def execute(cmd,tmp=dir.tmp):
res=gump.util.process.command.CmdResult(cmd)