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/03/20 19:37:40 UTC

cvs commit: gump/python/gump/model project.py workspace.py

ajack       2004/03/20 10:37:40

  Modified:    python/gump/model project.py workspace.py
  Log:
  Trying to make artifact ids from jar basenames (removing -@@DATE@@ and .jar)
  Need to add ids manually.
  
  Revision  Changes    Path
  1.68      +12 -2     gump/python/gump/model/project.py
  
  Index: project.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/project.py,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- project.py	19 Mar 2004 18:19:18 -0000	1.67
  +++ project.py	20 Mar 2004 18:37:40 -0000	1.68
  @@ -420,8 +420,18 @@
                   for jar in self.getJars():
                       if not jar.hasId():
                           basename=os.path.basename(jar.getPath())
  -                        self.addWarning('Jar [' + jar.getPath() + '] identifier set to jar basename: [' + basename + ']')    
  -                        jar.setId(basename)
  +                        newId=basename
  +                        # Strip off .jar
  +                        if newId.endswith('.jar'):
  +                            newId=newId[:-4]
  +                        # Strip off -@@DATE@@
  +                        datePostfix='-' + str(default.date)
  +                        if newId.endswith(datePostfix):
  +                            reduction=-1 * len(datePostfix)
  +                            newId=newId[:reduction]
  +                        # Assign...
  +                        self.addWarning('Jar [' + basename + '] identifier set to jar basename: [' + newId + ']')    
  +                        jar.setId(newId)
           
           # Grab all the work
           for w in self.xml.work:
  
  
  
  1.37      +1 -1      gump/python/gump/model/workspace.py
  
  Index: workspace.py
  ===================================================================
  RCS file: /home/cvs/gump/python/gump/model/workspace.py,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- workspace.py	19 Mar 2004 23:11:47 -0000	1.36
  +++ workspace.py	20 Mar 2004 18:37:40 -0000	1.37
  @@ -38,7 +38,7 @@
   from gump.utils.listener import Listener, Event
   
   #
  -# :TODO: Need to createa GumpEnvironment to move these to..
  +#
   #
   
   class Workspace(NamedModelObject, PropertyContainer, Statable, Resultable):
  
  
  

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