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

Re: Consistent error codes from RA layers

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 06 Mar 2008 16:35:29 +0000

Paul Burba wrote:
> On Thu, Mar 6, 2008 at 5:25 AM, Julian Foad <julianfoad_at_btopenworld.com> wrote:
>>Code like this appears in several places:
>> > err = editor->delete_entry(path, item->revision, parent_baton, pool);
>> > if (err)
>> > {
>> > if (err->apr_err == SVN_ERR_FS_NOT_FOUND
>> > || err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND)
>> These two errors both mean "the item was not present in the repository". When
>> committing to the repository, this indicates that the WC is out of date w.r.t.
>> the repository.
>> SVN_ERR_FS_NOT_FOUND is sent by the file or svn RA layers, and
>> SVN_ERR_RA_DAV_PATH_NOT_FOUND is sent by the http/https RA layers, with the
>> same meaning.
> Julian,
> Thanks, this reminded me of a similar case a couple of months ago --
> which I subsequently forgot about :-(
> See: http://svn.haxx.se/dev/archive-2007-12/0457.shtml. Anyhow, I
> bring this up mainly because in that thread Karl suggests, "The
> fix(es) should happen as close to the original (server-side) source of
> the error as possible, IMHO." Barring that, the fix should be in the
> particular RA implementation.
> When you say the "RA layers ought to be made to return the same error
> code for this case" which approach were you thinking of, a fix as much
> on the server side as possible or strictly within the RA
> implementations?

I didn't specifically mean the fix ought to be within the RA layer
implementations. I haven't looked into where these errors propagate from, and
have no view on where they should be consolidated.

- Julian

>> The RA layers are intended to provide a consistent interface, so I think all
>> the RA layers ought to be made to return the same error code for this case.
>> At the very least, svn_delta_editor_t ought to document the error codes that
>> its functions return in this and similar situations.

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-03-06 17:36:11 CET

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