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 2003/11/24 17:14:06 UTC

cvs commit: jakarta-gump/python/gump config.py

ajack       2003/11/24 08:14:06

  Modified:    python/gump/model module.py workspace.py
               python/gump/utils commandLine.py
               python/gump/document forrest.py
               python/gump config.py
  Log:
  1) CVS command line fix [refactoring problems] (long story)
  2) Command line options -v/-d document in help
  
  Revision  Changes    Path
  1.13      +16 -10    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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- module.py	24 Nov 2003 01:45:15 -0000	1.12
  +++ module.py	24 Nov 2003 16:14:06 -0000	1.13
  @@ -82,10 +82,12 @@
           self.hostPrefix 	=   xml['host-prefix']
           self.dir			=	xml.dir    
           
  -                
       def getCvsRoot(self):
  -        # Form the CVS root
  +        """Construct the CVS root for this set of information"""
  +
  +        # Form the CVS root starting with the method
           root=':' + str(self.repository.getMethod()) + ':'
  +        # Add the user (if set)
           if self.repository.hasUser(): root+=str(self.repository.getUser())
           # Forge the hostname
           if self.repository.hasHostname():
  @@ -104,28 +106,32 @@
           return root
       
       def hasTag(self):
  -        return self.getTag()
  +        if self.tag: return 1
  +        return 0
           
       def getTag(self):
  -        return self.tag
  +        return str(self.tag)
           
       def hasHostPrefix(self):
  -        return self.getHostPrefix()
  +        if self.hostPrefix: return 1
  +        return 0
           
       def getHostPrefix(self):
  -        return self.tag
  +        return str(self.hostPrefix)
           
       def hasDir(self):
  -        return self.getDir()
  +        if self.dir: return 1
  +        return 0
           
       def getDir(self):
  -        return self.dir
  +        return str(self.dir)
       
       def hasModule(self):
  -        return self.getModule()
  +        if self.module: return 1
  +        return 0
           
       def getModule(self):
  -        return self.module
  +        return str(self.module)
            
   class ModuleSvn(ModelObject):
       def __init__(self,xml,repository):
  
  
  
  1.12      +1 -1      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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- workspace.py	24 Nov 2003 01:45:15 -0000	1.11
  +++ workspace.py	24 Nov 2003 16:14:06 -0000	1.12
  @@ -489,7 +489,7 @@
               self.noRuper=1
               self.addWarning('"ruper" command not found, no package downloads')
           
  -        if not self.checkExecutable('rsync','-help',0): 
  +        if not self.checkExecutable('rsync','-version',0): 
               self.noRSync=1
               self.addWarning('"rsync" command not found, so attempting recursive copy "cp -R"')
           
  
  
  
  1.2       +9 -1      jakarta-gump/python/gump/utils/commandLine.py
  
  Index: commandLine.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/utils/commandLine.py,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- commandLine.py	17 Nov 2003 22:10:55 -0000	1.1
  +++ commandLine.py	24 Nov 2003 16:14:06 -0000	1.2
  @@ -101,6 +101,10 @@
                   print "  -V,  --version           display the version of Gump and exit."
                   print "  -h,  --help              print this help."
                   print "  -w,  --workspace         use this workspace for Gump."
  +                print 
  +                print "General:"
  +                print "  -v,  --verbose           verbose logging."
  +                print "  -d,  --debug             debug logging."
                   print
                   print "For bug reports use Bugzilla: http://bugzilla.apache.org/."
                   print "For suggestions: <gump@jakarta.apache.org/>."
  @@ -131,10 +135,14 @@
           self.args += argv
     
           # 
  +        # Process global arguments
  +        #
           for arg in self.args:
               if arg in ['-d','--debug']: 
  +                log.info('Setting log level to DEBUG')
                   log.setLevel(logging.DEBUG ) 
  -            if arg in ['-v','--verbose']: 
  +            elif arg in ['-v','--verbose']: 
  +                log.info('Setting log level to VERBOSE')
                   log.setLevel(logging.VERBOSE )  
       
       def getArguments(self):
  
  
  
  1.14      +11 -8     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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- forrest.py	23 Nov 2003 06:16:39 -0000	1.13
  +++ forrest.py	24 Nov 2003 16:14:06 -0000	1.14
  @@ -868,8 +868,8 @@
               detailsList.createEntry("Nag To: ", toaddr)
               detailsList.createEntry("Nag From: ", fromaddr)     
               
  -        self.documentProjectList(document, "Project Dependencies",	project.getDependencies(), project)  
  -        self.documentProjectList(document, "Project Dependees",		project.getDependees(), project)
  +        self.documentProjectList(document, "Project Dependencies",	project.getDependencies(), 0, project)  
  +        self.documentProjectList(document, "Project Dependees",		project.getDependees(), 1, project)
       
           if project.hasBuildCommand():
               (classpath,bootclasspath)=project.getClasspathLists()            
  @@ -936,20 +936,23 @@
           if not paths:        
               pathTable.createLine('No ' + title + ' entries')
                        
  -    def documentProjectList(self,document,title,dependencies,referencingObject):
  +    def documentProjectList(self,document,title,dependencies,dependees,referencingObject):
         if dependencies:
               projectSection=document.createSection(title)
  -            projectTable=projectSection.createTable(['Name','Optional','State'])
  +            projectTable=projectSection.createTable(['Name','Type','State'])
               for depend in dependencies:
  -                project=depend.getProject()
  +                if not dependees:
  +                    project=depend.getProject()
  +                else:
  +                    project=depend.getOwnerProject()
                   projectRow=projectTable.createRow()    
                   projectRow.createComment(project.getName())
                   self.insertLink( project, referencingObject, projectRow.createData())
                   
  -                optional=''
  +                type=''
                   if depend.isOptional():
  -                    optional='Y'                
  -                projectRow.createData(optional)
  +                    type='Optional'                
  +                projectRow.createData(type)
                   
                   self.insertStateDescription(project,referencingObject,projectRow.createData())
                   
  
  
  
  1.6       +1 -1      jakarta-gump/python/gump/config.py
  
  Index: config.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/config.py,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- config.py	21 Nov 2003 19:04:10 -0000	1.5
  +++ config.py	24 Nov 2003 16:14:06 -0000	1.6
  @@ -132,7 +132,7 @@
       
   class switch:
       """Configuration of switches """   
  -    optimize=0 # Optimize (at risk to exact correctness) anywhere one can
  +    optimize=1 # Optimize (at risk to exact correctness) anywhere one can
       optimizenetwork=1 # Do least network traffic 
       debugging=0 # Not debugging..