[Checkins] SVN: lovely.recipe/trunk/ mkdir makes sure directories
are never deleted
Juergen Kartnaller
juergen at kartnaller.at
Fri Sep 21 03:55:26 EDT 2007
Log message for revision 79784:
mkdir makes sure directories are never deleted
Changed:
U lovely.recipe/trunk/CHANGES.txt
U lovely.recipe/trunk/setup.py
U lovely.recipe/trunk/src/lovely/recipe/fs/README.txt
U lovely.recipe/trunk/src/lovely/recipe/fs/mkdir.py
U lovely.recipe/trunk/src/lovely/recipe/testing.py
-=-
Modified: lovely.recipe/trunk/CHANGES.txt
===================================================================
--- lovely.recipe/trunk/CHANGES.txt 2007-09-21 07:47:54 UTC (rev 79783)
+++ lovely.recipe/trunk/CHANGES.txt 2007-09-21 07:55:25 UTC (rev 79784)
@@ -8,7 +8,12 @@
BIG TODO: add tests for lovely.recipe.zeo and lovely.recipe.zope to test and
to show for what this all is for.
+2007/09/21 0.3.1b1:
+===================
+- mkdir makes sure directories are never deleted
+
+
2007/08/31 0.3.1a3:
===================
Modified: lovely.recipe/trunk/setup.py
===================================================================
--- lovely.recipe/trunk/setup.py 2007-09-21 07:47:54 UTC (rev 79783)
+++ lovely.recipe/trunk/setup.py 2007-09-21 07:55:25 UTC (rev 79784)
@@ -13,7 +13,7 @@
setup (
name='lovely.recipe',
- version='0.3.1a3',
+ version='0.3.1b1',
author = "Lovely Systems",
author_email = "office at lovelysystems.com",
license = "ZPL 2.1",
Modified: lovely.recipe/trunk/src/lovely/recipe/fs/README.txt
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/fs/README.txt 2007-09-21 07:47:54 UTC (rev 79783)
+++ lovely.recipe/trunk/src/lovely/recipe/fs/README.txt 2007-09-21 07:55:25 UTC (rev 79784)
@@ -27,6 +27,32 @@
d mystuff
d parts
+If we change the directory name the old directory ('mystuff') is not deleted.
+
+ >>> write(sample_buildout, 'buildout.cfg',
+ ... """
+ ... [buildout]
+ ... parts = data-dir
+ ...
+ ... [data-dir]
+ ... recipe = lovely.recipe:mkdir
+ ... path = otherdir
+ ... """)
+ >>> print system(buildout),
+ Uninstalling data-dir.
+ Installing data-dir.
+ data-dir: Creating directory otherdir
+
+ >>> ls(sample_buildout)
+ - .installed.cfg
+ d bin
+ - buildout.cfg
+ d develop-eggs
+ d eggs
+ d mystuff
+ d otherdir
+ d parts
+
Creating Files
==============
@@ -57,6 +83,8 @@
d develop-eggs
d eggs
- file.sh
+ d mystuff
+ d otherdir
d parts
The content is written to the file.
@@ -70,3 +98,34 @@
>>> path = os.path.join(sample_buildout, 'file.sh')
>>> oct(stat.S_IMODE(os.stat(path)[stat.ST_MODE]))
'0755'
+
+If we change the filename the old file is deleted.
+
+ >>> write(sample_buildout, 'buildout.cfg',
+ ... """
+ ... [buildout]
+ ... parts = script
+ ...
+ ... [script]
+ ... recipe = lovely.recipe:mkfile
+ ... path = newfile.sh
+ ... content = hoschi
+ ... mode = 0755
+ ... """)
+ >>> print system(buildout)
+ Uninstalling script.
+ Installing script.
+ script: Writing file /sample-buildout/newfile.sh
+ <BLANKLINE>
+
+ >>> ls(sample_buildout)
+ - .installed.cfg
+ d bin
+ - buildout.cfg
+ d develop-eggs
+ d eggs
+ d mystuff
+ - newfile.sh
+ d otherdir
+ d parts
+
Modified: lovely.recipe/trunk/src/lovely/recipe/fs/mkdir.py
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/fs/mkdir.py 2007-09-21 07:47:54 UTC (rev 79783)
+++ lovely.recipe/trunk/src/lovely/recipe/fs/mkdir.py 2007-09-21 07:55:25 UTC (rev 79784)
@@ -23,6 +23,8 @@
logging.getLogger(self.name).info(
'Creating directory %s', os.path.basename(path))
os.mkdir(path)
- return path
+ return ()
+ def update(self):
+ pass
Modified: lovely.recipe/trunk/src/lovely/recipe/testing.py
===================================================================
--- lovely.recipe/trunk/src/lovely/recipe/testing.py 2007-09-21 07:47:54 UTC (rev 79783)
+++ lovely.recipe/trunk/src/lovely/recipe/testing.py 2007-09-21 07:55:25 UTC (rev 79784)
@@ -4,6 +4,8 @@
def setUpBuildout(test):
testing.buildoutSetUp(test)
testing.install_develop('zc.recipe.egg', test)
+ testing.install_develop('zc.zodbrecipes', test)
+ testing.install_develop('zc.zope3recipes', test)
testing.install_develop('lovely.recipe', test)
testing.install_develop('ZODB3', test)
testing.install_develop('zodbcode', test)
More information about the Checkins
mailing list