[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: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2005-09-13 11:43:05 CEST

> > 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.
Ah, but there you have a point.
Looking at the doxygen comment (snippet taken fromhttp://hix.nu/subversion/lxr/source/subversion/include/svn_ra.h#928):
919 /**920 * Set @a *dirent to an @c svn_dirent_t associated with @a path at @a921 * revision. @a path is relative to the @a session's parent's URL.922 * If @a path does not exist in @a revision, set @a *dirent to NULL.923 *924 * Use @a pool for memory allocation.925 *926 * @since New in 1.2.927 */928 svn_error_t *svn_ra_stat (svn_ra_session_t *session,929 const char *path,930 svn_revnum_t revision,931 svn_dirent_t **dirent,932 apr_pool_t *pool);
you're right. This is a bug then.
Since you have already studied the code, do you have a proposed fix?

Received on Tue Sep 13 11:46:23 2005

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