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

Re: svn commit: r9085 - in trunk/subversion: include libsvn_subr libsvn_wc

From: Ben Reser <ben_at_reser.org>
Date: 2004-03-17 01:37:10 CET

On Tue, Mar 16, 2004 at 06:38:51PM -0500, Greg Hudson wrote:
> On Tue, 2004-03-16 at 18:31, Ben Reser wrote:
> > > If we want to enable shared working directories (in 1.1), perhaps the
> > > best option is to introduce a function private to libsvn_wc, which
> > > invokes svn_io_set_file_read_write only on Windows.
>
> > Actually there is code in other sections that would need this same
> > behavior. I think we should just add a function in 1.1 that gives us a
> > place to put things that need to be done before a file is removed.
>
> I feel like "prep file for removal" is not a good candidate for a real
> API. I'd be a bit happier seeing an API for "remove a file which we
> expect is read-only," which could perhaps be called
> svn_io_remove_read_only_file().

Actually there is good reason to put this in a separate API and my
quoting of the name was because of that reason.

There are 3 cases where we need to make a read-only file writable on
Windows before we can carry out an operation:

1) removal
2) renaming
3) replacing/overwriting with a new file.

We could make new functions for remove (which already does this now),
copy, rename, and a open that force a +w. Or we could make one new
function that does things we'd want to do before one of these operations
on a read-only file. I just haven't come up with a good name for it
yet.

> (Alternatively, we could treat it as a bug that svn_io_remove_file()
> doesn't work on read-only files under Windows, and just make it do so,
> but that might affect our performance if we start issuing set-attr calls
> before every file deletion on Windows.)

Actually svn_io_remove_file() already handles removing read-only files
on Windows.

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 17 01:37:36 2004

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.