You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <ch...@gmail.com> on 2006/04/14 11:30:02 UTC

Re: svn commit: r19348 - in trunk/subversion: libsvn_wc tests/cmdline

On 4/13/06, rooneg@tigris.org <ro...@tigris.org> wrote:
> Author: rooneg
> Date: Thu Apr 13 12:25:02 2006
> New Revision: 19348
>
> Modified:
>    trunk/subversion/libsvn_wc/status.c
>    trunk/subversion/tests/cmdline/stat_tests.py
>
> Log:
> Fix a crash that occurs when running 'svn status -u' with a missing
> subdirectory.
>
> Found by: Fabian Cenedese <Ce...@indel.ch>
>
> * subversion/libsvn_wc/status.c
>   (find_dir_url): Handle the case where an entry's url is NULL, and
>    add a comment describing how this can happen.
>
> * subversion/tests/cmdline/stat_tests.py
>   Import shutil.
>   (status_dash_u_missing_dir): New test for this problem.
>   (test_list): Add new test.
>
>
Hi,
It seems your fix doesn't work on Windows:
CMD: svnadmin.exe "create" "svn-test-work\repositories\stat_tests-19"
"--bdb-txn-nosync" "--fs-type=fsfs" <TIME = 0.079000>
CMD: svnadmin.exe dump "svn-test-work\local_tmp\repos" | svnadmin.exe
load "svn-test-work\repositories\stat_tests-19" <TIME = 0.015000>
CMD: svn.exe "co" "--username" "jrandom" "--password" "rayjandom"
"file:///M:/tests-local/subversion/tests/cmdline/svn-test-work/repositories/stat_tests-19"
"svn-test-work\working_copies\stat_tests-19" "--config-dir"
"M:\tests-local\subversion\tests\cmdline\svn-test-work\local_tmp\config"
<TIME = 0.594000>
CMD: svn.exe "status" "svn-test-work\repositories\stat_tests-19"
"svn-test-work\repositories\stat_tests-19" "--config-dir"
"M:\tests-local\subversion\tests\cmdline\svn-test-work\local_tmp\config"
<TIME = 0.047000>
PASS:  stat_tests.py 19: status on unversioned dir (issue 2030)
CLEANUP: svn-test-work\working_copies\stat_tests-19
CLEANUP: svn-test-work\repositories\stat_tests-19
CMD: svnadmin.exe "create" "svn-test-work\repositories\stat_tests-20"
"--bdb-txn-nosync" "--fs-type=fsfs" <TIME = 0.047000>
CMD: svnadmin.exe dump "svn-test-work\local_tmp\repos" | svnadmin.exe
load "svn-test-work\repositories\stat_tests-20" <TIME = 0.000000>
CMD: svn.exe "co" "--username" "jrandom" "--password" "rayjandom"
"file:///M:/tests-local/subversion/tests/cmdline/svn-test-work/repositories/stat_tests-20"
"svn-test-work\working_copies\stat_tests-20" "--config-dir"
"M:\tests-local\subversion\tests\cmdline\svn-test-work\local_tmp\config"
<TIME = 0.578000>
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



--
Ivan Zhakov

Re: svn commit: r19348 - in trunk/subversion: libsvn_wc tests/cmdline

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 4/14/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On 4/14/06, Ivan Zhakov <ch...@gmail.com> wrote:
>
> > 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.
>
> That's probably it.  Note in svntest/main.py there's a safe_rmtree
> function that we use for such things.  I'll make this test use it.

See r19371.  I'd appreciate it if you could give it a try and let me
know if it works on windows.

Thanks,

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: svn commit: r19348 - in trunk/subversion: libsvn_wc tests/cmdline

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 4/14/06, Ivan Zhakov <ch...@gmail.com> wrote:

> 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.

That's probably it.  Note in svntest/main.py there's a safe_rmtree
function that we use for such things.  I'll make this test use it.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: svn commit: r19348 - in trunk/subversion: libsvn_wc tests/cmdline

Posted by Ivan Zhakov <ch...@gmail.com>.
On 4/14/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On 4/14/06, Ivan Zhakov <ch...@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

Re: svn commit: r19348 - in trunk/subversion: libsvn_wc tests/cmdline

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 4/14/06, Ivan Zhakov <ch...@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...

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org