You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by le...@apache.org on 2005/04/16 16:43:51 UTC
svn commit: r161573 - in gump/branches/Gump3: metadata/giraffe.xml
pygump/python/gump/plugins/mkdirbuilder.py
pygump/python/gump/test/testPluginMkdirBuilder.py
Author: leosimons
Date: Sat Apr 16 07:43:50 2005
New Revision: 161573
URL: http://svn.apache.org/viewcvs?view=rev&rev=161573
Log:
Use makedirs instead of mkdir.
* pygump/python/gump/plugins/mkdirbuilder.py,
pygump/python/gump/test/testPluginMkdirBuilder.py,
metadata/giraffe.xml:
Add support for creating nested non-existent directories to the mkdir builder, and add a supporting testcase.
Modified:
gump/branches/Gump3/metadata/giraffe.xml
gump/branches/Gump3/pygump/python/gump/plugins/mkdirbuilder.py
gump/branches/Gump3/pygump/python/gump/test/testPluginMkdirBuilder.py
Modified: gump/branches/Gump3/metadata/giraffe.xml
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/metadata/giraffe.xml?view=diff&r1=161572&r2=161573
==============================================================================
--- gump/branches/Gump3/metadata/giraffe.xml (original)
+++ gump/branches/Gump3/metadata/giraffe.xml Sat Apr 16 07:43:50 2005
@@ -50,6 +50,12 @@
<module name="ant"/>
</project>
+ <project name="test-attempt-mkdirs">
+ <module name="ant"/>
+
+ <mkdir dir="some/directory"/>
+ </project>
+
<project name="bootstrap-ant">
<module name="ant"/>
Modified: gump/branches/Gump3/pygump/python/gump/plugins/mkdirbuilder.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/plugins/mkdirbuilder.py?view=diff&r1=161572&r2=161573
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/plugins/mkdirbuilder.py (original)
+++ gump/branches/Gump3/pygump/python/gump/plugins/mkdirbuilder.py Sat Apr 16 07:43:50 2005
@@ -39,8 +39,8 @@
if os.path.exists(dirpath):
raise Error, "Directory path '%s' to be created exists as a file!" % dirpath
- os.mkdir(dirpath)
+ os.makedirs(dirpath)
- def visit_project(self, project):
+ def visit_project(self, project):
for command in [command for command in project.commands if isinstance(command,Mkdir)]:
self._do_mkdir(project, command.directory)
Modified: gump/branches/Gump3/pygump/python/gump/test/testPluginMkdirBuilder.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/test/testPluginMkdirBuilder.py?view=diff&r1=161572&r2=161573
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/test/testPluginMkdirBuilder.py (original)
+++ gump/branches/Gump3/pygump/python/gump/test/testPluginMkdirBuilder.py Sat Apr 16 07:43:50 2005
@@ -53,6 +53,10 @@
self.assert_(isdir(join(mpath,cmd.directory)))
rmtree(join(mpath,cmd.directory))
+ plugin._do_mkdir(cmd.project, "some/nested/directory")
+ self.assert_(isdir(join(mpath,"some/nested/directory")))
+ rmtree(join(mpath,"some/nested/directory"))
+
p.add_command(cmd)
cmd2 = Mkdir(p,"somedir2")
p.add_command(cmd2)