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

Re: svn commands fails on write-only files or directories access

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2006-07-28 23:52:33 CEST

On 7/28/06, Julian Foad <julianfoad@btopenworld.com> wrote:
> Alexander Thomas wrote:
> > While trying to svn add a write-only file, I got error message like
> >
> > subversion/libsvn_subr/io.c:2473: (apr_err=13)
> > svn: Can't open file 'foo': Permission denied
> (but it has actually been added to the WC)
> That's a bit ugly: ideally the operation would fail atomically. However,
> that's a fairly unusual thing to attempt, and the symptoms seem safe enough in
> my trials: it shows up as "added" in "svn status", and can be reverted, and
> cannot be committed. The user could well be confused but I don't see any
> danger there. Therefore I don't think it's an important bug, but certainly it
> would be nice to have a cleaner failure mode (i.e. not actually marking the
> item as added).
> The reason it fails in this way is because of non-atomic WC handling. The
> function libsvn_client/add.c:add_file() first calls svn_wc_add2() which adds
> the file, and then goes to work out what properties it should have, and tries
> to read the file for MIME type detection. Ideally we'd work out the properties
> first, and then use some form of "svn_wc_add()" function that could add the
> file with its properties in a single operation.
> Perhaps the keen WC people would like to take a look at this...

I did. In r20895, I reordered operations. That commit can be
backported to 1.4 and even 1.3. I agree that we probably want a
svn_wc_add3() which also adds props, but since that would be an API
change, it's not the right time to implement that now (it would become
available in 1.5 at the earliest...)



To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 28 23:53:06 2006

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.