gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump engine.py config.py
Date Fri, 21 Nov 2003 19:04:11 GMT
ajack       2003/11/21 11:04:10

  Modified:    python/gump/model workspace.py repository.py module.py
                        rawmodel.py
               python/gump/test __init__.py model.py loader_tests.py
                        pyunit.py gumpset_tests.py
               python/gump/utils __init__.py
               python/gump/document forrest.py
               python/gump engine.py config.py
  Added:       python/gump/test updater.py
               python/gump/test/resources/full1 svn_module1.xml module2.xml
                        module1.xml repository1.xml module3.xml
                        package1.xml profile.xml module4.xml workspace.xml
                        svn_repository1.xml
  Removed:     python/gump/test/resources/simple3 repository.xml
                        profile.xml project3.xml project4.xml project2.xml
                        project1.xml package1.xml workspace.xml
  Log:
  1) Added SVN support w/ some unit tests 
  2) Renamed simple3 = full1 (it is the test workspace).
  
  Revision  Changes    Path
  1.8       +9 -2      jakarta-gump/python/gump/model/workspace.py
  
  Index: workspace.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/workspace.py,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- workspace.py	21 Nov 2003 04:41:22 -0000	1.7
  +++ workspace.py	21 Nov 2003 19:04:10 -0000	1.8
  @@ -84,7 +84,7 @@
       	PropertyContainer.__init__(self)
       	
       	#
  -    	# Named repositories (e.g. CVS)
  +    	# Named repositories (e.g. CVS,SVN,etc.)
       	# Named modules
       	# named projects
       	#
  @@ -99,7 +99,8 @@
       	# Set to true if not found, see checkEnvironment
       	#
       	self.noRSync=0
  -    	self.noForrest=0    	
  +    	self.noForrest=0    
  +    	self.noRuper=0    	
       	
       	#
       	# JAVACMD can override this, see checkEnvironment
  @@ -440,9 +441,15 @@
           self.checkExecutable('javac','-help',exitOnError)
           self.checkExecutable('java com.sun.tools.javac.Main','-help',exitOnError,0,'check_java_compiler')
   
           self.checkExecutable('cvs','--version',exitOnError)
  +        
           if not self.noForrest and not self.checkExecutable('forrest','-projecthelp',0):

               self.noForrest=1
               self.addWarning('"forrest" command not found, no xdoc output')
  +        
  +        if not self.noRuper and \
  +            not self.checkExecutable('java  org.krysalis.ruper2.tool.ResourceTool','-version',exitOnError,0,'check_ruper'):

  +            self.noRuper=1
  +            self.addWarning('"ruper" command not found, no package downloads')
           
           if not self.checkExecutable('rsync','-help',0): 
               self.noRSync=1
  
  
  
  1.4       +23 -11    jakarta-gump/python/gump/model/repository.py
  
  Index: repository.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/repository.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- repository.py	20 Nov 2003 20:51:48 -0000	1.3
  +++ repository.py	21 Nov 2003 19:04:10 -0000	1.4
  @@ -74,18 +74,26 @@
       def __init__(self,xml,workspace):
       	NamedModelObject.__init__(self,xml.getName(),xml,workspace)
       
  -        if xml.root:
  -            if xml.root.method: 
  -                self.method=xml.root.method
  -            # :TODO: And if not? Default?            
  -            
  -            if xml.root.user: self.user=xml.root.user
  -            if xml.root.password: self.password=xml.root.password
  -            if xml.root.path: self.path=xml.root.path
  -            if xml.root.hostname: self.hostname=self.xml.root.hostname
  -        else:
  -            raise RuntimeError, 'No XML <root on repository: ' + self.getName()
           
  +        if 'cvs'==xml.type:
  +            if xml.root:
  +                if xml.root.method: 
  +                    self.method=xml.root.method
  +                # :TODO: And if not? Default?            
  +            
  +                if xml.root.user: self.user=xml.root.user
  +                if xml.root.password: self.password=xml.root.password
  +                if xml.root.path: self.path=xml.root.path
  +                if xml.root.hostname: self.hostname=self.xml.root.hostname
  +            else:
  +                raise RuntimeError, 'No XML <root on repository: ' + self.getName()
  +        elif 'svn'==xml.type:  
  +
  +            if xml.url:
  +                self.url=str(xml.url)
  +            else:
  +                raise RuntimeError, 'No URL on SVN repository: ' + self.getName()
  +            
           # Modules referencing this repository
           self.modules=[]
               
  @@ -124,6 +132,7 @@
       def hasMethod(self): return hasattr(self,'method')
       def hasHostname(self): return hasattr(self,'hostname')   
       
  +    
       def getTitle(self): return str(self.xml.title)
       def getHomePage(self): return str(getattr(self.xml,'home-page'))
       def getCvsWeb(self): return str(self.xml.cvsweb)
  @@ -133,6 +142,9 @@
       def getPath(self): return str(self.path)
       def getMethod(self): return str(self.method)
       def getHostname(self): return str(self.hostname)
  +    
  +    def hasUrl(self): return hasattr(self,'url')
  +    def getUrl(self): return str(self.url)
       
       def addModule(self,module):
           self.modules.append(module)
  
  
  
  1.10      +86 -8     jakarta-gump/python/gump/model/module.py
  
  Index: module.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/module.py,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- module.py	21 Nov 2003 04:41:22 -0000	1.9
  +++ module.py	21 Nov 2003 19:04:10 -0000	1.10
  @@ -127,6 +127,25 @@
       def getModule(self):
           return self.module
            
  +class ModuleSVN(ModelObject):
  +    def __init__(self,xml,repository):
  +        ModelObject.__init__(self,xml)
  +        
  +        # Reference to the shared repository
  +        self.repository=repository
  +        
  +        # Extract settings
  +        if xml.url:
  +            self.url	=	str(xml.url)
  +        elif self.repository.hasUrl():
  +            self.url 	=  self.repository.getUrl()
  +    
  +    def hasUrl(self):
  +        return (hasattr(self,'url') and self.url)
  +        
  +    def getUrl(self):
  +        return self.url
  +         
   def createUnnamedModule(workspace):
       #
       # Create an Unnamed Module (for projects not in modules)
  @@ -249,8 +268,19 @@
                       self.changeState(STATE_FAILED,REASON_CONFIG_FAILED)               
                       log.error(':TODO: No such repository in w/s ['+ repoName +'] on ['
\
                               + self.getName() + ']')
  -            
  -     
  +                            
  +            elif self.xml.svn:                
  +                repoName=self.xml.svn.repository
  +                if workspace.hasRepository(repoName):
  +                    # It references this repository...
  +                    repo=workspace.getRepository(repoName)
  +                    self.repository=repo
  +                    repo.addModule(self)
  +                    self.svn=ModuleSVN(self.xml.svn,repo)
  +                else:
  +                    self.changeState(STATE_FAILED,REASON_CONFIG_FAILED)               
  +                    log.error(':TODO: No such repository in w/s ['+ repoName +'] on ['
\
  +                            + self.getName() + ']')                 
                       
           self.setComplete(1)            
           
  @@ -405,9 +435,12 @@
       def getWorkspace(self):
           return self.workspace
       
  -    def isCVS(self):
  +    def isCvs(self):
           return hasattr(self,'cvs') and self.cvs
           
  +    def isSvn(self):
  +        return hasattr(self,'svn') and self.svn
  +        
       # Where the contents (at the repository) updated?
       def isUpdated(self):
           return self.updated
  @@ -422,8 +455,10 @@
           return self.repository
           
       def getUpdateCommand(self,exists=0):
  -        if self.isCVS():
  +        if self.isCvs():
               return self.getCvsUpdateCommand(exists)
  +        elif self.isSvn():
  +            return self.getSvnUpdateCommand(exists)
           
           #:TODO: SubVersion
           pass
  @@ -487,12 +522,55 @@
               if self.cvs.hasTag():
                   cmd.addParameter('-r',self.cvs.getTag(),' ')
   
  -        if self.cvs.hasModule():
  -            if self.cvs.getModule()<>self.getName(): 
  -                cmd.addParameter('-d',self.getName(),' ')
  -            cmd.addParameter(self.cvs.getModule())
  +            if self.cvs.hasModule():
  +                if not self.cvs.getModule() == self.getName(): 
  +                    cmd.addParameter('-d',self.getName(),' ')
  +                cmd.addParameter(self.cvs.getModule())
           
           return (self.repository, root, cmd)
  +     
  +     
  +    def getSvnUpdateCommand(self,exists=0):
  +        
  +        log.debug("SubVersion Update Module " + self.getName() + \
  +                       ", Repository Name: " + str(self.repository.getName()))
  +                                        
  +        url=self.svn.getUrl()
  +      
  +        log.debug("SVN URL: [" + url + "] on Repository: " + self.repository.getName())
  +     
  +        #
  +        # Prepare CVS checkout/update command...
  +        # 
  +        cmd=Cmd('svn','update_'+self.getName(),self.getWorkspace().cvsdir)
  +    
  +        if exists:
  +
  +            # do a cvs update
  +            cmd.addParameter('update')
  +
  +        else:
  +
  +            # do a cvs checkout
  +            cmd.addParameter('checkout')
  +            if self.svn.hasUrl():
  +                cmd.addParameter(self.svn.getUrl())
  +          
  +        #
  +        # Be 'quiet' (but not silent) unless requested otherwise.
  +        #
  +        if 	not self.isDebug() 	\
  +            and not self.isVerbose() \
  +            and not self.svn.isDebug()	\
  +            and not self.svn.isVerbose():    
  +            cmd.addParameter('-q')
  +          
  +        #
  +        # Request non-interactive
  +        #
  +        cmd.addParameter('--non-interactive')
  +
  +        return (self.repository, url, cmd)
        
        
   class ModuleStatistics(Statistics):
  
  
  
  1.4       +2 -0      jakarta-gump/python/gump/model/rawmodel.py
  
  Index: rawmodel.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/model/rawmodel.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- rawmodel.py	19 Nov 2003 15:42:16 -0000	1.3
  +++ rawmodel.py	21 Nov 2003 19:04:10 -0000	1.4
  @@ -133,6 +133,7 @@
     list={}
     def init(self):
       self.cvs=Single(GumpXMLModelObject)
  +    self.svn=Single(GumpXMLModelObject)
       self.url=Single(GumpXMLModelObject)
       self.description=Single(GumpXMLModelObject)
       self.redistributable=Single(GumpXMLModelObject)
  @@ -145,6 +146,7 @@
       self['home-page']=Single(GumpXMLModelObject)
       self.title=Single(GumpXMLModelObject)
       self.cvsweb=Single(GumpXMLModelObject)
  +    self.url=Single(GumpXMLModelObject)
       self.root=Single(XMLRepositoryRoot)
       self.redistributable=Single(GumpXMLModelObject)
   
  
  
  
  1.4       +1 -1      jakarta-gump/python/gump/test/__init__.py
  
  Index: __init__.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/__init__.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- __init__.py	20 Nov 2003 20:51:49 -0000	1.3
  +++ __init__.py	21 Nov 2003 19:04:10 -0000	1.4
  @@ -74,7 +74,7 @@
   from gump.utils.tools import listDirectoryAsWork
   
   def getTestWorkspace(xml=None):
  -    if not xml: xml='gump/test/resources/simple3/workspace.xml'
  +    if not xml: xml='gump/test/resources/full1/workspace.xml'
       
       print "Workspace File: " + str(xml)
       #
  
  
  
  1.4       +12 -1     jakarta-gump/python/gump/test/model.py
  
  Index: model.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/model.py,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- model.py	21 Nov 2003 02:32:41 -0000	1.3
  +++ model.py	21 Nov 2003 19:04:10 -0000	1.4
  @@ -115,6 +115,9 @@
           self.assertNonZero('Repository CVSWEB',repo1.getCvsWeb())
           self.assertNonZeroString('Repository CVSWEB',repo1.getCvsWeb())        
           self.assertTrue('Repository has Modules', repo1.hasModules())
  +        
  +        repo2 = self.workspace.getRepository('svn_repository1')  
  +        self.assertNonZeroString('Repository SVN URL',repo2.getUrl())
   
       def testComparisons(self):
           project1 = self.project1
  @@ -143,8 +146,16 @@
       def testCVS(self):
           module1=self.module1
           
  -        self.assertTrue('Module is CVS', module1.isCVS())
  +        self.assertTrue('Module is CVS', module1.isCvs())
  +        self.assertFalse('Module is NOT SVN', module1.isSvn())
           self.assertNonZeroString('CVSROOT',module1.cvs.getCVSRoot())
  +    
  +    def testSVN(self):
  +        svnmodule1= self.workspace.getModule('svn_module1')
  +        
  +        self.assertTrue('Module is SVN', svnmodule1.isSvn())
  +        self.assertFalse('Module is NOT CVS', svnmodule1.isCvs())
  +        self.assertNonZeroString('SVN URL',svnmodule1.svn.getUrl())
       
       def testDependencyMapping(self):
           
  
  
  
  1.2       +1 -1      jakarta-gump/python/gump/test/loader_tests.py
  
  Index: loader_tests.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/loader_tests.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- loader_tests.py	17 Nov 2003 22:10:53 -0000	1.1
  +++ loader_tests.py	21 Nov 2003 19:04:10 -0000	1.2
  @@ -94,7 +94,7 @@
   
       #testWorkspace('gump/test/resources/simple2/workspace.xml').dump()
       
  -    #testWorkspace('gump/test/resources/simple3/workspace.xml').dump()
  +    #testWorkspace('gump/test/resources/full1/workspace.xml').dump()
   
       #try:
       #    testWorkspace('gump/test/resources/broken1/broken_workspace.xml') 
  
  
  
  1.7       +3 -0      jakarta-gump/python/gump/test/pyunit.py
  
  Index: pyunit.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/pyunit.py,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- pyunit.py	21 Nov 2003 02:32:41 -0000	1.6
  +++ pyunit.py	21 Nov 2003 19:04:10 -0000	1.7
  @@ -287,6 +287,9 @@
       from gump.test.documenter import DocumenterTestSuite  
       runner.addSuite(DocumenterTestSuite())
       
  +    from gump.test.updater import UpdaterTestSuite  
  +    runner.addSuite(UpdaterTestSuite())
  +    
       # Perform the tests...
       runner.run()
       
  
  
  
  1.2       +1 -1      jakarta-gump/python/gump/test/gumpset_tests.py
  
  Index: gumpset_tests.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/test/gumpset_tests.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- gumpset_tests.py	17 Nov 2003 22:10:53 -0000	1.1
  +++ gumpset_tests.py	21 Nov 2003 19:04:10 -0000	1.2
  @@ -103,5 +103,5 @@
       log.setLevel(gump.default.logLevel)
   
       #testWorkspace('gump/test/resources/simple1/standalone_workspace.xml')
  -    testWorkspace('gump/test/resources/simple3/workspace.xml')
  +    testWorkspace('gump/test/resources/full1/workspace.xml')
   
  
  
  
  1.1                  jakarta-gump/python/gump/test/updater.py
  
  Index: updater.py
  ===================================================================
  #!/usr/bin/env python
  # $Header:  1.7 2003/05/10 18:20:36 nicolaken Exp $
  # $Revision: 1.7 $
  # $Date: 2003/05/10 18:20:36 $
  #
  # ====================================================================
  #
  # The Apache Software License, Version 1.1
  #
  # Copyright (c) 2003 The Apache Software Foundation.  All rights
  # reserved.
  #
  # Redistribution and use in source and binary forms, with or without
  # modification, are permitted provided that the following conditions
  # are met:
  #
  # 1. Redistributions of source code must retain the above copyright
  #    notice, this list of conditions and the following disclaimer.
  #
  # 2. Redistributions in binary form must reproduce the above copyright
  #    notice, this list of conditions and the following disclaimer in
  #    the documentation and/or other materials provided with the
  #    distribution.
  #
  # 3. The end-user documentation included with the redistribution, if
  #    any, must include the following acknowlegement:
  #       "This product includes software developed by the
  #        Apache Software Foundation (http://www.apache.org/)."
  #    Alternately, this acknowlegement may appear in the software itself,
  #    if and wherever such third-party acknowlegements normally appear.
  #
  # 4. The names "The Jakarta Project", "Alexandria", and "Apache Software
  #    Foundation" must not be used to endorse or promote products derived
  #    from this software without prior written permission. For written
  #    permission, please contact apache@apache.org.
  #
  # 5. Products derived from this software may not be called "Apache"
  #    nor may "Apache" appear in their names without prior written
  #    permission of the Apache Group.
  #
  # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  # DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  # ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  # SUCH DAMAGE.
  # ====================================================================
  #
  # This software consists of voluntary contributions made by many
  # individuals on behalf of the Apache Software Foundation.  For more
  # information on the Apache Software Foundation, please see
  # <http://www.apache.org/>.
  
  """
      Model Testing
  """
  
  import os
  import logging
  import types, StringIO
  
  from gump import log
  import gump.config
  from gump.output.statsdb import *
  from gump.test import getWorkedTestWorkspace
  from gump.test.pyunit import UnitTestSuite
  
  class UpdaterTestSuite(UnitTestSuite):
      def __init__(self):
          UnitTestSuite.__init__(self)
          
      def suiteSetUp(self):
          #
          # Load a decent Workspace
          #
          self.workspace=getWorkedTestWorkspace()          
          self.assertNotNone('Needed a workspace', self.workspace)
          
          self.repo1=self.workspace.getRepository('repository1')                  
          self.svnRepo1=self.workspace.getRepository('svn_repository1')                  
          
          self.module1=self.workspace.getModule('module1')      
          self.svnModule1=self.workspace.getModule('svn_module1')
              
      def testCommandLines(self):
          
          # Checkouts
          (repo, root, cmd) = command=self.module1.getUpdateCommand(0)  
      
          (repo, url, cmd) = command=self.svnModule1.getUpdateCommand(0)  
          
          # Updates
          (repo, root, cmd) = command=self.module1.getUpdateCommand(1)  
          
          (repo, url, cmd) = command=self.svnModule1.getUpdateCommand(1)  
          
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/svn_module1.xml
  
  Index: svn_module1.xml
  ===================================================================
  <module name="svn_module1">
  
    <url  href="http://ant.apache.org/index.html"/>
    <description>
      Java based build tool
    </description>
  
    <svn repository="svn_repository1"/>
  
    <project name="svn_project1">
      <package>org.apache.tools.ant</package>
      <ant target="gump"/>
      <depend project="random"/>
      <option project="random"/>
      <home nested="dist"/>
      <jar name="lib/output.jar" id="output"/>
      <license name="LICENSE"/>
  
      <nag from="Gump Integration Build &lt;dev@ant.apache.org&gt;"
           to="dev@ant.apache.org"/>
    </project>
  
  </module>
  
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/module2.xml
  
  Index: module2.xml
  ===================================================================
  <module name="module2">
  
    <url  href="http://ant.apache.org/index.html"/>
    <description>
      Java based build tool
    </description>
  
    <cvs repository="repository1"/>
  
    <project name="project2">
      <package>org.apache.tools.ant</package>
  
      <ant target="gump">
        <property name="ant.home" reference="home" project="project1"/>
      </ant>
  
      <depend project="project1"/>
      <option project="random"/>
  
      <home nested="dist"/>
  
      <jar name="lib/output.jar" id="output"/>
  
      <license name="LICENSE"/>
  
      <nag from="Gump Integration Build &lt;dev@ant.apache.org&gt;"
           to="dev@ant.apache.org"/>
    </project>
  </module>
  
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/module1.xml
  
  Index: module1.xml
  ===================================================================
  <module name="module1">
  
    <url  href="http://ant.apache.org/index.html"/>
    <description>
      Java based build tool
    </description>
  
    <cvs repository="repository1"/>
  
    <project name="project1">
      <package>org.apache.tools.ant</package>
  
      <ant target="gump"/>
  
      <option project="random"/>
  
      <home nested="dist"/>
  
      <jar name="lib/output.jar" id="output"/>
  
      <license name="LICENSE"/>
  
      <nag from="Gump Integration Build &lt;dev@ant.apache.org&gt;"
           to="dev@ant.apache.org"/>
    </project>
  </module>
  
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/repository1.xml
  
  Index: repository1.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <repository name="repository1" type="cvs">
    <title>Repository 1</title>
    <home-page>http://jakarta.apache.org/gump</home-page>
    <cvsweb>http://cvs.apache.org/viewcvs/</cvsweb>
    <redistributable/>
  
    <root>
      <method>pserver</method>
      <user>anoncvs</user>
      <password>anoncvs</password>
      <hostname>cvs.apache.org</hostname>
      <path>/home/cvspublic</path>
    </root>
  </repository>
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/module3.xml
  
  Index: module3.xml
  ===================================================================
  <module name="module3">
  
    <url  href="http://ant.apache.org/index.html"/>
    <description>
      Java based build tool
    </description>
  
    <cvs repository="repository1"/>
  
    <project name="project3">
      <package>org.apache.tools.ant</package>
  
      <ant target="gump">
        <property name="ant.home" reference="home" project="project1"/>
      </ant>
  
      <depend project="project2"/>
      <option project="random"/>
  
      <home nested="dist"/>
  
      <jar name="lib/output.jar" id="output"/>
  
      <license name="LICENSE"/>
  
      <nag from="Gump Integration Build &lt;dev@ant.apache.org&gt;"
           to="dev@ant.apache.org"/>
    </project>
  </module>
  
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/package1.xml
  
  Index: package1.xml
  ===================================================================
  <module name="package1">
  
    <url  href="http://ant.apache.org/index.html"/>
    <description>
      Java based build tool
    </description>
  
    <cvs repository="repository1"/>
  
    <project name="package1">
      <package>org.apache.tools.ant</package>
  
      <ant target="gump"/>
  
      <depend project="random"/>
      <option project="random"/>
  
      <home nested="dist"/>
  
      <jar name="lib/output.jar" id="output"/>
  
      <license name="LICENSE"/>
  
      <nag from="Gump Integration Build &lt;dev@ant.apache.org&gt;"
           to="dev@ant.apache.org"/>
    </project>
    
    <project name="honorary1">
      <package>org.apache.tools.ant</package>
      <depend project="random"/>
      <option project="random"/>
      <home nested="dist"/>
    </project>
  </module>
  
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/profile.xml
  
  Index: profile.xml
  ===================================================================
  <profile name="gump">
  
    <module href="package1.xml"/>
    <module href="module1.xml"/>
    <module href="module2.xml"/>
    <module href="module3.xml"/>
    <module href="module4.xml"/>
    <module href="svn_module1.xml"/>
  
    <!-- Repository definitions -->
  
    <repository href="repository1.xml"/>
    <repository href="svn_repository1.xml"/>
  
    <project name='package1' package='package1' />
    
  </profile>
  
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/module4.xml
  
  Index: module4.xml
  ===================================================================
  <module name="module4">
  
    <url  href="http://ant.apache.org/index.html"/>
    <description>
      Java based build tool
    </description>
  
    <cvs repository="repository1"/>
  
    <project name="project4">
      <package>org.apache.tools.ant</package>
  
      <ant target="gump">
        <property name="ant.home" reference="home" project="project1"/>
      </ant>
  
      <depend project="project1"/>
      <depend project="project3"/>
      <option project="random"/>
  
      <home nested="dist"/>
  
      <jar name="lib/output.jar" id="output"/>
  
      <license name="LICENSE"/>
  
      <nag from="Gump Integration Build &lt;dev@ant.apache.org&gt;"
           to="dev@ant.apache.org"/>
    </project>
  </module>
  
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/workspace.xml
  
  Index: workspace.xml
  ===================================================================
  <?xml version="1.0" ?>
  <workspace basedir="/data/gump" 
             jardir="/data/gump/jars/latest"
             logdir="/data/gump/log"
             pkgdir="/data/package"
             sync="rsync -r -a --delete" version="0.3">
  
    <property name="build.sysclasspath" value="only"/>
  
    <profile href="profile.xml"/>
  
  </workspace>
  
  
  
  1.1                  jakarta-gump/python/gump/test/resources/full1/svn_repository1.xml
  
  Index: svn_repository1.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <repository name="svn_repository1" type="svn">
    <title>SVN Repository 1</title>
    
    <home-page>http://svn.apache.org/</home-page>
    <web>http://svn.apache.org/viewsvn/</web>
    
    <redistributable/>
    
    <url>http://svn.apache.org/</url>
   
  </repository>
  
  
  
  1.5       +20 -3     jakarta-gump/python/gump/utils/__init__.py
  
  Index: __init__.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/utils/__init__.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- __init__.py	21 Nov 2003 02:32:41 -0000	1.4
  +++ __init__.py	21 Nov 2003 19:04:10 -0000	1.5
  @@ -170,7 +170,6 @@
       # Return it sorted
       return sorted   
   
  -# :TODO: Go find the one I lost...
   def banner():
       printSeparator()
       print
  @@ -215,8 +214,26 @@
       return elapsedTimeToString(secsToElapsedTime(secs))           
       
   def elapsedTimeToString(elapsed):
  -    #:TODO: Don't show hours if 0, show mins/secs words
  -    return ('%02d:%02d:%02d' % elapsed)        
  +    elapsedString=''
  +    
  +    (hours,mins,secs) = elapsed
  +    
  +    if hours:
  +        if elapsedString: elapsedString += ' '
  +        elapsedString += str(hours)+' hour'
  +        if hours: elapsedString += 's'
  +        
  +    if mins:
  +        if elapsedString: elapsedString += ' '    
  +        elapsedString += str(mins)+' min'
  +        if mins: elapsedString += 's'
  +        
  +    if secs:
  +        if elapsedString: elapsedString += ' '    
  +        elapsedString += str(secs)+' sec'
  +        if secs: elapsedString += 's'
  +    
  +    return elapsedString    
       
   def secsToDate(secs):
       return time.strftime(setting.datetimeformat, \
  
  
  
  1.12      +7 -3      jakarta-gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- forrest.py	21 Nov 2003 02:32:41 -0000	1.11
  +++ forrest.py	21 Nov 2003 19:04:10 -0000	1.12
  @@ -766,7 +766,7 @@
                                   module, \
                                   repoList.createEntry( "Repository: ") )
                                   
  -            if module.isCVS():
  +            if module.isCvs():
                   if module.cvs.hasModule():
                        repoList.createEntry( "CVS Module: ", module.cvs.getModule()) 
                        
  @@ -781,6 +781,10 @@
                        
                   repoList.createEntry( "CVSROOT: ", module.cvs.getCVSRoot()) 
   
  +            if module.isSvn():
  +                if module.svn.hasUrl():
  +                     repoList.createEntry( "SVN URL: ", module.svn.getUrl())          
      
  +
                   
              
       #   x.write('<p><strong>Module Config :</strong> <link href=\'xml.html\'>XML</link></p>')
  @@ -1076,7 +1080,7 @@
                       val = param.value
                       # :TODO: Hack for BOOTCLASSPATH
                       if param.name.startswith('bootclasspath'):
  -                       val=';:\n'.join(val.split(';'))
  +                       val=default.classpathSeparator+'\n'.join(val.split(default.classpathSeparator))
   
                       paramRow.createData(val or'')
                           
  @@ -1093,7 +1097,7 @@
                       if value:
                           # :TODO: Hack for CLASSPATH
                           if name == "CLASSPATH":
  -                            value=';\n'.join(value.split(';'))
  +                            value=default.classpathSeparator+'\n'.join(value.split(default.classpathSeparator))
                           envRow.createData(escape(value))
                       else:
                           envRow.createData('N/A')
  
  
  
  1.11      +10 -7     jakarta-gump/python/gump/engine.py
  
  Index: engine.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/engine.py,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- engine.py	21 Nov 2003 00:27:58 -0000	1.10
  +++ engine.py	21 Nov 2003 19:04:10 -0000	1.11
  @@ -175,9 +175,9 @@
           # Update all the modules that have CVS repositories
           for module in run.getGumpSet().getModules():          
           
  -            if not module.isCVS(): continue
  +            if not module.isCvs() and not module.isSvn(): continue
               
  -            log.debug('Perform CVS Update on: ' + module.getName())
  +            log.debug('Perform CVS/SVN Update on: ' + module.getName())
       
               if module.okToPerformWork():
                   
  @@ -189,12 +189,15 @@
                   #
                   (repository, root, cmd ) = module.getUpdateCommand(exists)
                   
  -                #
  -                # Provide logins, if not already there
  -                #
  -                loginToRepositoryOnDemand(repository,root,logins)
  +                if self.isCvs():
  +                    #
  +                    # Provide CVS logins, if not already there
  +                    #
  +                    loginToRepositoryOnDemand(repository,root,logins)
                  
  +                #
                   # Execute the command and capture results        
  +                #
                   cmdResult=execute(cmd,workspace.tmpdir)
         
                   work=CommandWorkItem(WORK_TYPE_UPDATE,cmd,cmdResult)
  @@ -224,7 +227,7 @@
           for module in run.getGumpSet().getModules():
       
               # If no CVS, nothing to sync   
  -            if not module.isCVS(): continue
  +            if not module.isCvs() and not module.isSvn(): continue
       
               if module.okToPerformWork():
               
  
  
  
  1.5       +5 -0      jakarta-gump/python/gump/config.py
  
  Index: config.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/config.py,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- config.py	20 Nov 2003 20:51:49 -0000	1.4
  +++ config.py	21 Nov 2003 19:04:10 -0000	1.5
  @@ -112,6 +112,11 @@
       prefix = '[GUMP@' + gumphost + ']'
       signature="\r\n--\r\nGump http://jakarta.apache.org/gump\n" \
           + '[' + gumpfullhost + "]\n"
  +        
  +    if not os.name == 'dos' and not os.name == 'nt':
  +        classpathSeparator=':'
  +    else:
  +        classpathSeparator=';'
       
   class setting:    
       """Configuration of hardcoded settings"""
  
  
  

Mime
View raw message