Philip Martin wrote:
>John Peacock <jpeacock@rowman.com> writes:
>
>
>
>>What I propose is that svn_io_set_file_read_write() itself be extended
>>to try a little harder. If the existing directory would permit the
>>file to be renamed and recreated (i.e., the group ownership of the
>>directory would permit it), then after the first attempt to change
>>READONLY fails, the code could then attempt to rename and
>>copy/recreate the file with the correct perms.
>>
>>
>
>No, I don't think that's the way to go. The thing about
>svn_io_set_file_read_write is that it is really a Windows function,
>it's not needed on Unix. Windows doesn't allow us to delete read-only
>files (I don't know if it allows us to rename them either), so we have
>to set them read-write first. As I recall, there are very few places
>where the Unix client *needs* to set read-write, most of the time it
>just slows us down, and leads to the ownership problems. APR doesn't
>provide platform independence here.
>
>A better plan would be to identify those places where the set
>read-write call is only needed on Windows, and make those platform
>specific. I believe there is an issue that covers this.
>
>
Actually, from looking at the code, 90% of the places where we call
svn_io_set_file_read_write should be removed -- because they're just
before a call to svn_io_remove_file, which _already_ makes the file
writable only on Windows.
--
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 Wed Dec 17 02:02:11 2003