ajack       2004/03/12 10:25:29

  Modified:    python/gump/document forrest.py
  Log:
  We need a smarter (multi-step) strategy for wiping work and target

  directories:

  

  1) So we don't loose atom/rss/other in src/docs/contents

  2) So we have a smaller window of missing public files.
  
  Revision  Changes    Path
  1.103     +24 -18    gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/document/forrest.py,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- forrest.py        12 Mar 2004 16:10:39 -0000      1.102
  +++ forrest.py        12 Mar 2004 18:25:28 -0000      1.103
  @@ -157,7 +157,8 @@
               
           # Copy in the defaults        
           forrestTemplate=self.getForrestTemplateDirectory()           
  -        syncDirectories(     forrestTemplate,        \
  +        # :TODO: We need to sync, but we write to contents...
  +        copyDirectories(     forrestTemplate,        \
                               forrestDir,      \
                               workspace)    
                                       
  @@ -174,15 +175,22 @@
           forrestDir=self.getForrestDirectory(workspace)      
           
           #
  -        # First deleted the tree (if exists), then ensure created
  -        #
  -        logDirectory=workspace.getLogDirectory()
  -        if os.path.exists(logDirectory):
  -            try:
  -                shutil.rmtree(logDirectory)  
  -            except: pass
  -        if not os.path.exists(logDirectory):          
  -            os.makedirs(logDirectory)
  +        # :TODO:
  +        #    1)      We need to do this sooner ('cos things write into content 
before this module)
  +        #    2)      We need a staging area that we write to, then we Sync to the 
real output
  +        #            so we have less of a window of missing public files.
  +        #
  +        #
  +        #    #
  +        #    # First deleted the tree (if exists), then ensure created
  +        #    #
  +        #    logDirectory=workspace.getLogDirectory()
  +        #    if os.path.exists(logDirectory):
  +        #        try:
  +        #            shutil.rmtree(logDirectory)  
  +        #        except: pass
  +        #    if not os.path.exists(logDirectory):          
  +        #        os.makedirs(logDirectory)
           
           # Then generate...        
           forrest=Cmd('forrest','forrest',forrestDir)
  @@ -630,13 +638,11 @@
               #
               # Determine if there are todos, otherwise continue
               #
  -            mcount=0
  +            todos=0
               for pair in module.aggregateStates():
                   if pair.state==STATE_FAILED:
  -                    mcount=1
  -                    
  -            if not mcount: continue
  -    
  +                    todos=1                    
  +            if not todos: continue    
               # Shown something...
               mcount+=1
               
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to