On 4/14/06, Garrett Rooney <rooneg@electricjellyfish.net> wrote:
> On 4/14/06, Ivan Zhakov <chemodax@gmail.com> wrote:
>
> > It seems your fix doesn't work on Windows:
>
> > UNEXPECTED EXCEPTION:
> > Traceback (most recent call last):
> > File "C:\svnbuild\src-trunk\subversion\tests\cmdline\svntest\main.py",
> > line 671, in run
> > rc = self.pred.run(args)
> > File "C:\svnbuild\src-trunk\subversion\tests\cmdline\svntest\testcase.py",
> > line 104, in run
> > return apply(self.func, args)
> > File "C:\svnbuild\src-trunk\subversion/tests/cmdline/stat_tests.py",
> > line 854, in status_dash_u_missing_dir
> > shutil.rmtree(a_d_g)
> > File "C:\Python24\lib\shutil.py", line 163, in rmtree
> > rmtree(fullname, ignore_errors, onerror)
> > File "C:\Python24\lib\shutil.py", line 168, in rmtree
> > onerror(os.remove, fullname, sys.exc_info())
> > File "C:\Python24\lib\shutil.py", line 166, in rmtree
> > os.remove(fullname)
> > OSError: [Errno 13] Permission denied:
> > 'svn-test-work\\working_copies\\stat_tests-20\\A\\D\\G\\.svn\\entries'
> > FAIL: stat_tests.py 20: status on missing directory
> > END: stat_tests.py
>
> Well, it's not so much that the fix doesn't work, it's that the test
> doesn't seem to work... It's failing to remove the directory before
> it even gets to run svn status -u.
>
> Does anyone have a clue how to reliably delete a directory from python
> under windows? I imagine this could be us hitting a virus scanner or
> something that's holding the entries file open...
>
Might be problem that entries file have read only attribute set, this
prevents file deletion without explicit clearing read only attribute?
How we remove directories when cleaning up working copy?
I don't think this caused by virus scanner, because it repeated
several times in one test.
--
Ivan Zhakov
Received on Fri Apr 14 19:50:55 2006