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

Re: Fwd: [Issue 2399] svn_ra_stat returning error for non-existent path instead of NULL dirent_t*

From: William Ferguson <william_ferguson_au_at_yahoo.com>
Date: 2005-09-13 11:23:58 CEST

> Why can't you just check for the specific error?

An that is exactly what I am doing in my hack.
But who's to say that this error condition can't be
generated from some other fault? Its hardly specified
as part of the contract for the function.

The question really is : how am I to distinguish
between a requested node not existing (because part of
the path in fact refers to a folder) versus some low
level failure of the function that is attempting to
return me that info? At the moment I getting a failure
(of a certain type) and assuming that means that the
file does not exist (because blah blah blah).

> I agree that this is orthogonal to the semantic
> discussion about when a
> path is considered not to exist, but I don't
> understand why you can't get
> what you want today.

Turn it on its head for minute.
What client code requires svn_ra_stat to return an
error in this situation? None I'll bet, because it is
undocumented and flies in the face of svn_ra_stat's
contract.

In which case, why not fix it up?
Its a single line change to the code.
Return a NULL dirent_t* instead of returning an error.

William

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 13 11:24:59 2005

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