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

Re: CVS update: subversion/subversion/libsvn_wc get_editor.c

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2000-10-09 06:28:15 CEST

> This ignores the error though, doesn't it? In this case, entry_get
> *is* returning an error (though not ENTRY_NOT_FOUND), and 'adding'
> is true, so none of the three branches is passing err back.

If entry_get returns an error with apr_err equal to something other
than SVN_ERR_WC_ENTRY_NOT_FOUND, then the first test will return err
immediately.

(Hey, why is apr_err being used to hold an SVN_* error code, anyway?)

(For easy review, the relevant part of the patch was:)

> if (err && (err->apr_err != SVN_ERR_WC_ENTRY_NOT_FOUND))
> return err;
> - else if ((! adding) && (err->apr_err == SVN_ERR_WC_ENTRY_NOT_FOUND))
> + else if ((! adding) && err)
> return svn_error_quick_wrap (err, "trying to replace non-versioned file");
> - else if (adding && err)
> - return svn_error_quick_wrap (err, "trying to add versioned file");
> + else if (adding && !err)
> + return svn_error_create (0, SVN_ERR_WC_ENTRY_EXISTS, NULL,
> + parent_dir_baton->pool,
> + "trying to add versioned file");
Received on Sat Oct 21 14:36:10 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.