cvs commit: gump/python/gump/gui view.py

2004-03-19 Thread ajack
ajack   2004/03/19 10:19:18

  Modified:python/gump/test/resources/full1 module4.xml module3.xml
   python/gump/model project.py depend.py ant.py
   python/gump/document forrest.py
   .gumpy.sh
   python/gump/test model.py
   python/gump/gui view.py
  Log:
  1) Make gumpy.sh cat log file to log directory, whenever it exits.

  2) Attempt to fix ant depend to set classpath.

  3) Unit tests for this and ant property
  
  Revision  ChangesPath
  1.9   +3 -0  gump/python/gump/test/resources/full1/module4.xml
  
  Index: module4.xml
  ===
  RCS file: /home/cvs/gump/python/gump/test/resources/full1/module4.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- module4.xml   15 Mar 2004 22:07:07 -  1.8
  +++ module4.xml   19 Mar 2004 18:19:18 -  1.9
  @@ -17,7 +17,10 @@
   /ant
   
   depend project=project1/
  +depend project=project2 runtime=true/
   depend project=project3/
  +
  +option project=project1 /
   
   home nested=dist/
   
  
  
  
  1.10  +9 -4  gump/python/gump/test/resources/full1/module3.xml
  
  Index: module3.xml
  ===
  RCS file: /home/cvs/gump/python/gump/test/resources/full1/module3.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- module3.xml   29 Feb 2004 19:16:19 -  1.9
  +++ module3.xml   19 Mar 2004 18:19:18 -  1.10
  @@ -11,12 +11,17 @@
   packageorg.apache.project3/package
   
   ant target=gump debug=true  
  +   !-- This is used to test depends in ant, which
  + are like properties only with classpath=add.
  + Please do not add any other dependences on project1
  + or this test will be silently invalidated --
 depend property=project1.jar project=project1/
  +  
  +  !-- This is used to test property dependencies,
  + do not add any other dependencies on project2
  + or the check that this is 'noclasspath' will fail --
  +  property property=project2.jar project=project2/
   /ant
  -
  -option project=project1 /
  -
  -depend project=project2 runtime=true/
   
   home nested=dist/

  
  
  
  1.67  +10 -7 gump/python/gump/model/project.py
  
  Index: project.py
  ===
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- project.py18 Mar 2004 23:24:55 -  1.66
  +++ project.py19 Mar 2004 18:19:18 -  1.67
  @@ -913,7 +913,7 @@
   # 
   )
   
  -(classpath,bootclasspath)=self.getClasspathLists()
  +(classpath,bootclasspath)=self.getClasspathObjects()
   
   # :TODO: write...
   for annotatedPath in classpath.getPathParts():
  @@ -970,7 +970,7 @@
   #
   # Calculate classpath and bootclasspath
   #
  -(classpath, bootclasspath) = self.getClasspathLists(debug)
  +(classpath, bootclasspath) = self.getClasspathObjects(debug)
   
   #
   # Return them simple/flattened
  @@ -999,7 +999,7 @@
   #
   # Return a tuple of (CLASSPATH, BOOTCLASSPATH) for a project
   #
  -def getClasspathLists(self,debug=0):
  +def getClasspathObjects(self,debug=0):
   Get a TOTAL classpath for a project (including its dependencies)
   
   #
  @@ -1065,12 +1065,15 @@
   def getDependOutputList(self,dependency,visited,depth=0,debug=0):  
   Get a classpath of outputs for a project (including its dependencies) 
   
  
  -# Don't loop, and skip ones that aren't here to
  -# affect the classpath
  -if (dependency in visited) or dependency.isNoClasspath():  
  +# Skip ones that aren't here to affect the classpath
  +if dependency.isNoClasspath():  
  +return (None,None)
  +
  +# Don't loop
  +if (dependency in visited):
   # beneficiary.addInfo(Duplicated dependency [ + str(depend) + ])
  
   if debug:
  -print str(depth) + ) Already Visited :  + str(depend)
  +print str(depth) + ) Already Visited :  + str(dependency)
   print str(depth) + ) Previously Visits  : 
   for v in visited:
   print str(depth) + )  -  + str(v)
  
  
  
  1.21  +1 -2  gump/python/gump/model/depend.py
  
  Index: depend.py
  ===
  RCS file: 

cvs commit: gump/python/gump/gui view.py

2004-03-09 Thread ajack
ajack   2004/03/09 11:57:07

  Modified:python/gump/model project.py depend.py module.py object.py
   python/gump/utils work.py tools.py sync.py
   python/gump/document forrest.py text.py
   python/gump gumprun.py engine.py integrate.py
   python/gump/gui view.py
  Added:   python   profileView.py
  Log:
  1) Created DependSet/Dependable to clean up dependency/dependee counts

  2) Migrated to Sync/Copy (from rsync)

  

  Ready to test...
  
  Revision  ChangesPath
  1.62  +15 -144   gump/python/gump/model/project.py
  
  Index: project.py
  ===
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- project.py7 Mar 2004 22:22:35 -   1.61
  +++ project.py9 Mar 2004 19:57:06 -   1.62
  @@ -180,13 +180,14 @@
   return os.pathsep.join(self.getSimpleClasspathList())
   
   
  -class Project(NamedModelObject, Statable, Resultable):
  +class Project(NamedModelObject, Statable, Resultable, Dependable):
   A single project
   def __init__(self,xml,workspace):
NamedModelObject.__init__(self,xml.getName(),xml,workspace)

Statable.__init__(self)
Resultable.__init__(self)
  + Dependable.__init__(self)

# Navigation
   self.module=None # Module has to claim ownership
  @@ -197,21 +198,7 @@

self.license=None

  - #
  - # Dependency Trees
  - #
  - 
  - # Those which we rely upon...
  - self.depends=[]
  - 
  - # Those which rely upon us...
  - self.dependees=[]
  - 
  - #
  - # Fully expanded
  - #
  - self.fullDepends=[]
  - self.fullDependees=[]
  + self.affected=0
   
#
#
  @@ -317,60 +304,6 @@
   
   def getReports(self):
   return self.reports
  -
  -def getDependencies(self):
  -return self.depends
  -
  -def getDependencyCount(self):   
  - Count the direct depenencies 
  -return len(self.depends)
  -
  -def getDependees(self):
  -return self.dependees
  -
  -def getDependeeCount(self):   
  - Count the direct dependees 
  -return len(self.dependees)
  -
  -def getFullDependencies(self):   
  -#
  -# Build a set of dependencies (once only)
  -#
  -if self.fullDepends: 
  -return self.fullDepends
  -
  -for dependency in self.depends:
  -if not dependency in self.fullDepends: 
  -self.fullDepends.append(dependency)
  -for subdepend in dependency.getProject().getFullDependencies():
  -if not subdepend in self.fullDepends:
  -self.fullDepends.append(subdepend)
  -self.fullDepends.sort()
  -
  -# Return stored
  -return self.fullDepends
  -
  -def getFullDependencyCount(self): 
  -return len(self.getFullDependencies())  
  -
  -def getFullDependees(self):   
  -if self.fullDependees: return self.fullDependees
  -
  -for dependee in self.dependees:
  -if not dependee in self.fullDependees: 
  -# We have a new dependee
  -self.fullDependees.append(dependee)
  -for subdependee in dependee.getOwnerProject().getFullDependees():
  -if not subdependee in self.fullDependees:
  -self.fullDependees.append(subdependee)
  -self.fullDependees.sort()
  -
  -# Store once
  -return self.fullDependees
  -
  -def getFullDependeeCount(self): 
  -return len(self.getFullDependees()) 
  -
   def getFOGFactor(self):
   return self.getStats().getFOGFactor()
   
  @@ -379,13 +312,10 @@
   return self.getModule().getStats().getLastUpdated()  
   
   def determineAffected(self):
  -affected=0
  -
  -# Get all dependenees (optional/otherwise)
  -fullDependees=self.getFullDependees()
  +if self.affected: return self.affected
   
   # Look through all dependees
  -for dependee in fullDependees:
  +for dependee in self.getFullDependees():
   project=dependee.getOwnerProject()
   
   cause=project.getCause()
  @@ -397,9 +327,9 @@
   # The something was this module or one of it's projects
   #