[py-dev] py.path.svnwc ensure problems
Martijn Faassen
faassen at startifact.com
Tue Feb 19 20:36:18 CET 2008
Hi there,
Imagine the following scenario:
* we have a svnwc: wc
* through some external mechanism, a directory 'map5' is created in it.
This directory is *not* added to SVN using 'svn add' yet.
* now through svnwc, we try to create a file in that directory by using
.ensure():
wc.join('map5').join('content').ensure()
We then get the following error:
...
File
"/home/faassen/buildout-eggs/py-0.9.0-py2.4.egg/py/path/svn/wccommand.py",
line 160, in ensure
p.add()
File
"/home/faassen/buildout-eggs/py-0.9.0-py2.4.egg/py/path/svn/wccommand.py",
line 175, in add
self._svn('add')
File
"/home/faassen/buildout-eggs/py-0.9.0-py2.4.egg/py/path/svn/wccommand.py",
line 87, in _svn
out = py.process.cmdexec(string)
File
"/home/faassen/buildout-eggs/py-0.9.0-py2.4.egg/py/process/cmdexec.py",
line 94, in posix_exec_cmd
''.join(out), ''.join(err))
Error: ExecutionFailed: 1 LC_ALL=C svn add
"/home/faassen/tmp/resynch/app2/data/map5/content"
svn: '/home/faassen/tmp/resynch/app2/data/map5' is not a working copy
svn: Can't open file
'/home/faassen/tmp/resynch/app2/data/map5/.svn/entries': No such file or
directory
It would be nicer for my purposes if 'ensure()' also ensured that all
directories above 'content' are added to SVN first (if indeed they
haven't been added yet).
Would this be good behavior in general for py.path.svnwc, or is there a
good reason not to do this?
Regards,
Martijn
More information about the Pytest-dev
mailing list