gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-gump/python/gump/document forrest.py
Date Fri, 19 Dec 2003 00:23:02 GMT
dims        2003/12/18 16:23:02

  Modified:    python/gump build.py
               python/gump/utils commandLine.py tools.py
               python/gump/document forrest.py
  Log:
  - Enhance command line parsing to be able to handle "python gump/integrate.py -d -w ../srida01l.xml
all" (note the -d for debug on)
  - Switch verbose on for 'cp'
  
  Revision  Changes    Path
  1.40      +2 -3      jakarta-gump/python/gump/build.py
  
  Index: build.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/build.py,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- build.py	2 Dec 2003 17:36:39 -0000	1.39
  +++ build.py	19 Dec 2003 00:23:02 -0000	1.40
  @@ -40,8 +40,7 @@
       args = handleArgv(sys.argv)
       ws=args[0]
       ps=args[1]
  -    quick=args[2]
  -    
  +
       # get parsed workspace definition
       workspace=WorkspaceLoader().load(ws)
         
  @@ -69,7 +68,7 @@
       #
       #    Perform this integration run...
       #
  -    if not quick:
  +    if '*' in args:
           result = engine.buildAll(run)
       else:
           result = engine.buildProjects(run)
  
  
  
  1.4       +25 -18    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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- commandLine.py	5 Dec 2003 00:51:49 -0000	1.3
  +++ commandLine.py	19 Dec 2003 00:23:02 -0000	1.4
  @@ -110,6 +110,20 @@
                   print "For suggestions: <gump@jakarta.apache.org/>."
                   sys.exit(0)
         
  +        # 
  +        # Process global arguments
  +        #
  +        for arg in argv:
  +            if arg in ['-d','--debug']:
  +                argv.remove(arg) 
  +                log.info('Setting log level to DEBUG')
  +                log.setLevel(logging.DEBUG ) 
  +            elif arg in ['-v','--verbose']: 
  +                argv.remove(arg) 
  +                log.info('Setting log level to VERBOSE')
  +                # :TODO:
  +                log.setLevel(logging.DEBUG )  
  +
           if len(argv)>2 and argv[1] in ['-w','--workspace']:
               self.args.append(argv[2])
               del argv[1:3]
  @@ -118,12 +132,17 @@
               log.info("No workspace defined with -w or -workspace.")
               log.info("Using default workspace: " + default.workspace)
       
  +        # Remove the XXX.PY
  +        del argv[0] 
  +          
           # determine which modules the user desires (wildcards are permitted)
           if requireProject:
  -            if len(argv)>1:
  -                self.args.append(argv[1] or '*')
  -                if self.args[1]=='all': self.args[1]='*'
  -                del argv[1:1]
  +            if len(argv)>0:
  +                for arg in argv:
  +                    if arg=='all':
  +                        self.args.append('*')
  +                    else: 
  +                        self.args.append(arg)
               else:
                   banner()
                   print
  @@ -131,21 +150,9 @@
                   print " Project wildcards are accepted, e.g. \"jakarta-*\"."
                   sys.exit(1)
       
  -        # Allow extras...
  -        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 ) 
  -            elif arg in ['-v','--verbose']: 
  -                log.info('Setting log level to VERBOSE')
  -                # :TODO:
  -                log.setLevel(logging.DEBUG )  
  -    
  +            log.info("Arguments:" + arg)
  +
       def getArguments(self):
           return self.args
   
  
  
  
  1.8       +1 -1      jakarta-gump/python/gump/utils/tools.py
  
  Index: tools.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/utils/tools.py,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- tools.py	6 Dec 2003 00:12:54 -0000	1.7
  +++ tools.py	19 Dec 2003 00:23:02 -0000	1.8
  @@ -132,7 +132,7 @@
       
       if noRSync:
           cmd=Cmd('cp','sync_'+name,cwddir)
  -        cmd.addParameter('-Rf')
  +        cmd.addParameter('-Rfv')
           cmd.addParameter(sourcedir)
           cmd.addParameter(destdir)
       else:
  
  
  
  1.40      +2 -2      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.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- forrest.py	16 Dec 2003 17:13:49 -0000	1.39
  +++ forrest.py	19 Dec 2003 00:23:02 -0000	1.40
  @@ -162,7 +162,7 @@
           forrestTemplate=self.getForrestTemplateDirectory()   
           
           forrestSeed=Cmd('cp','forrest_seed',forrestParentDir)
  -        forrestSeed.addParameter('-Rufv')
  +        forrestSeed.addParameter('-Rfv')
           forrestSeed.addParameter(forrestTemplate)    
           forrestSeed.addParameter(os.path.abspath(workspace.getBaseDirectory()))    
           forrestSeedResult=execute(forrestSeed)
  @@ -173,7 +173,7 @@
           forrestSiteTemplate=self.getForrestSiteTemplateDirectory()  
           if os.path.exists(forrestSiteTemplate):
               forrestSiteSeed=Cmd('cp','forrest_site_seed',forrestParentDir)
  -            forrestSiteSeed.addParameter('-Rufv')
  +            forrestSiteSeed.addParameter('-Rfv')
               forrestSiteSeed.addParameter(forrestSiteTemplate)    
               forrestSiteSeed.addParameter(workspace.getBaseDirectory())  
               forrestSiteSeedResult=execute(forrestSiteSeed)
  
  
  

Mime
View raw message