[py-svn] r32612 - in py/dist/py/path/svn: . testing
hpk at codespeak.net
hpk at codespeak.net
Sun Sep 24 00:45:01 CEST 2006
Author: hpk
Date: Sun Sep 24 00:44:58 2006
New Revision: 32612
Modified:
py/dist/py/path/svn/testing/test_wccommand.py
py/dist/py/path/svn/wccommand.py
Log:
fixed a long standing bug: py.path.svnwc.ensure would always
rewrite an empty file, bah.
Modified: py/dist/py/path/svn/testing/test_wccommand.py
==============================================================================
--- py/dist/py/path/svn/testing/test_wccommand.py (original)
+++ py/dist/py/path/svn/testing/test_wccommand.py Sun Sep 24 00:44:58 2006
@@ -189,6 +189,9 @@
newpath = self.root.ensure('a', 'b', 'c')
try:
assert newpath.check(exists=1, versioned=1)
+ newpath.write("hello")
+ newpath.ensure()
+ assert newpath.read() == "hello"
finally:
self.root.join('a').remove(force=1)
Modified: py/dist/py/path/svn/wccommand.py
==============================================================================
--- py/dist/py/path/svn/wccommand.py (original)
+++ py/dist/py/path/svn/wccommand.py Sun Sep 24 00:44:58 2006
@@ -141,6 +141,10 @@
"""
try:
p = self.join(*args)
+ if p.check():
+ if p.check(versioned=False):
+ p.add()
+ return p
if kwargs.get('dir', 0):
return p._ensuredirs()
parent = p.dirpath()
More information about the pytest-commit
mailing list