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/06/24 22:15:56 UTC

cvs commit: gump/python/gump/test model.py

ajack       2004/06/24 13:15:56

  Modified:    python/gump/model Tag: CleanUp project.py object.py
                        module.py workspace.py
               python/gump/loader Tag: CleanUp loader.py
               python/gump/test Tag: CleanUp model.py
  Log:
  Working on a splice (override) problem.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.85.2.10 +19 -5     gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.85.2.9
  retrieving revision 1.85.2.10
  diff -u -r1.85.2.9 -r1.85.2.10
  --- project.py	24 Jun 2004 16:30:09 -0000	1.85.2.9
  +++ project.py	24 Jun 2004 20:15:55 -0000	1.85.2.10
  @@ -4,7 +4,7 @@
   #
   # 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 atg
  +# You may obtain a copy of the License at
   # 
   #     http://www.apache.org/licenses/LICENSE-2.0
   # 
  @@ -178,7 +178,8 @@
       def getWorks(self): return self.works
           
       def hasJars(self):
  -        return self.jars
  +        if self.jars: return True
  +        return False
           
       def getJars(self):
           return self.jars.values()
  @@ -276,7 +277,7 @@
           return (not self.isPackaged()) and self.hasBuildCommand()
           
       # provide elements when not defined in xml
  -    def complete(self,workspace):
  +    def complete(self,workspace): 
           if self.isComplete(): return
   
           if not self.inModule():
  @@ -293,6 +294,7 @@
           # Packaged Projects don't need the full treatment..
           #
           packaged=self.isPackaged()
  +        if packaged: print 'PACKAGE ?????' + `self`
   
           # Import any <ant part [if not packaged]
           if self.hasDomChild('ant') and not packaged:
  @@ -371,13 +373,21 @@
               else:
                   self.addError('Missing \'name\' on <license')
           
  +        if packaged: 
  +            print 'PACKAGE w/ JARS?????'+ `self`
  +            print self.getXml()
  +        
           #
           # Resolve jars (outputs)
           #
           for jdom in self.getDomChildIterator('jar'):
               name=self.expandVariables(
                       getDomAttributeValue(jdom,'name'))
  +                    
  +            if packaged:   print 'NAME: ' + name
  +            
               if self.home and name:
  +                if packaged: print 'NAME2: ' + self.home + ':' + name    
                   jar=Jar(name,jdom,self)
                   jar.complete()
                   jar.setPath(os.path.abspath(os.path.join(self.home,name)))
  @@ -385,9 +395,7 @@
               else:
                   self.addError('Missing \'name\' on <jar')
                   
  -        #
           # Fix 'ids' on all Jars which don't have them
  -        #
           if self.hasJars():
               if 1 == self.getJarCount():
                   jar=self.getJarAt(0)
  @@ -597,6 +605,12 @@
               self.maven.dump(indent+1,output)
           if self.script:
               self.script.dump(indent+1,output)
  +            
  +        for work in self.works:
  +            work.dump(indent+1,output)
  +            
  +        for jar in self.getJars():
  +            jar.dump(indent+1,output)
               
       #
       # Return a list of the outputs this project generates
  
  
  
  1.24.2.6  +6 -0      gump/python/gump/model/object.py
  
  Index: object.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/object.py,v
  retrieving revision 1.24.2.5
  retrieving revision 1.24.2.6
  diff -u -r1.24.2.5 -r1.24.2.6
  --- object.py	14 Jun 2004 13:38:04 -0000	1.24.2.5
  +++ object.py	24 Jun 2004 20:15:55 -0000	1.24.2.6
  @@ -227,8 +227,14 @@
           
       def splice(self,dom): 
           # Import overrides from DOM
  +        print 'PRE=SPLICE'
  +        self.dump()
  +        print self.getXml()
           transferDomInfo(dom, self, {})   
           self.setSpliced(True) 
  +        print 'POST=SPLICE'
  +        self.dump()
  +        print self.getXml()
                               	
       def complete(self):
           if self.isComplete(): return    
  
  
  
  1.45.2.7  +9 -9      gump/python/gump/model/module.py
  
  Index: module.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/module.py,v
  retrieving revision 1.45.2.6
  retrieving revision 1.45.2.7
  diff -u -r1.45.2.6 -r1.45.2.7
  --- module.py	16 Jun 2004 19:42:02 -0000	1.45.2.6
  +++ module.py	24 Jun 2004 20:15:55 -0000	1.45.2.7
  @@ -362,15 +362,15 @@
                           self.addError('No such repository ['+ str(repoName) +'] in workspace on [' \
                                   + self.getName() + ']')                 
   
  -            # Grab all notifications
  -            for notifyEntry in self.getDomChildIterator('nag'):
  -                # Determine where to send
  -                toaddr=getDomAttributeValue(notifyEntry,'to',workspace.mailinglist)
  -                fromaddr=getDomAttributeValue(notifyEntry,'from',workspace.email)   
  -                self.notifys.append(
  -                        AddressPair(
  -                            getStringFromUnicode(toaddr),	\
  -                            getStringFromUnicode(fromaddr)))  
  +        # Grab all notifications
  +        for notifyEntry in self.getDomChildIterator('nag'):
  +            # Determine where to send
  +            toaddr=getDomAttributeValue(notifyEntry,'to',workspace.mailinglist)
  +            fromaddr=getDomAttributeValue(notifyEntry,'from',workspace.email)   
  +            self.notifys.append(
  +                    AddressPair(
  +                        getStringFromUnicode(toaddr),
  +                        getStringFromUnicode(fromaddr)))  
           
   
           if self.hasDomChild('url'):
  
  
  
  1.51.2.7  +0 -1      gump/python/gump/model/workspace.py
  
  Index: workspace.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/workspace.py,v
  retrieving revision 1.51.2.6
  retrieving revision 1.51.2.7
  diff -u -r1.51.2.6 -r1.51.2.7
  --- workspace.py	18 Jun 2004 14:58:17 -0000	1.51.2.6
  +++ workspace.py	24 Jun 2004 20:15:55 -0000	1.51.2.7
  @@ -302,7 +302,6 @@
               tracker.check(self)           
           
           # Complete the projects   
  -        haveUnnamedModule=0
           for project in self.getProjects():
               # Projects needs a module (even if pseudo)
               if not project.inModule():
  
  
  
  No                   revision
  No                   revision
  1.1.2.8   +3 -1      gump/python/gump/loader/Attic/loader.py
  
  Index: loader.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/loader/Attic/loader.py,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- loader.py	21 Jun 2004 15:53:30 -0000	1.1.2.7
  +++ loader.py	24 Jun 2004 20:15:56 -0000	1.1.2.8
  @@ -15,7 +15,9 @@
   # limitations under the License.
   
   """
  -    This module contains information on
  +
  +    This module contains information on loading metadata
  +    
   """
   import os.path
   import time
  
  
  
  No                   revision
  No                   revision
  1.21.2.4  +8 -2      gump/python/gump/test/model.py
  
  Index: model.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/test/model.py,v
  retrieving revision 1.21.2.3
  retrieving revision 1.21.2.4
  diff -u -r1.21.2.3 -r1.21.2.4
  --- model.py	14 Jun 2004 21:31:45 -0000	1.21.2.3
  +++ model.py	24 Jun 2004 20:15:56 -0000	1.21.2.4
  @@ -71,9 +71,15 @@
                       self.workspace.getLogDirectory() )
                       
       def testPackages(self):
  +        
  +        self.package1.dump()
  +        
           self.assertTrue('Is a package marked', self.package1.isPackageMarked())
           self.assertTrue('Is a package', self.package1.isPackaged())
  +        self.assertTrue('Has Jars', self.package1.hasJars())
           self.assertTrue('Is a package', self.packagedModule1.isPackaged())
  +        
  +        
           
       def testRepository(self):
           repo1 = self.repo1
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org