[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 1893 - trunk/subversion/libsvn_subr

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-05-07 17:53:40 CEST

Karl Fogel wrote:

>brane@tigris.org writes:
>>On Win32, a file can't be deleted if its read-only attribute is set.
>>* subversion/libsvn_subr/io.c (apr_dir_remove_recursively): Clear the
>>read-only attribute before removing a file.
>Is this the behavior we want for remove_recursively(), though? Just
>curious what the circumstance was that led to this change... Was it
>trying to remove a .svn subdir and failing?
Exactly. Sorry, I should've written that to the log.

What actually triggered the problem for me was updating on Windows after
the expat-lite dir was removed from the repo. The update failed, because
it couldn't remove the various read-only files in expat-lite/.svn. I had
to remove them by hand, "svn cleanup" and "svn up" again to get it working.

This fix solves this particular problem, which also showed up in python
tests on Win32.

On another note: I feel we should rename that funciton to
svn_dir_remove. If we want to get something into APR, I'd rather see an
apr_dir_recurse that takes a callback, and implement svn_dir_remove on
top of that. IIRC we discussed that some time ago. Thoughts?

>>Modified: trunk/subversion/libsvn_subr/io.c
>>--- trunk/subversion/libsvn_subr/io.c (original)
>>+++ trunk/subversion/libsvn_subr/io.c Tue May 7 08:27:24 2002
>>@@ -902,6 +902,13 @@
>> }
>> else if (this_entry.filetype == APR_REG)
>> {
>>+ status = apr_file_attrs_set (fullpath,
>>+ 0,
>>+ subpool);
>>+ if (status && status != APR_ENOTIMPL)
>>+ return status;
>> status = apr_file_remove (fullpath, subpool);
>> if (! (APR_STATUS_IS_SUCCESS (status))) return status;
>> }
>>To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
>>For additional commands, e-mail: svn-help@subversion.tigris.org
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org

Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 7 17:55:02 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.