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

Re: svn commit: r38893 - in trunk/subversion: include/private libsvn_client libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 25 Aug 2009 01:45:45 +0000

On Mon, Aug 24, 2009 at 18:58, Daniel Näslund<daniel_at_longitudo.com> wrote:
> This IS a catastrophe! I had totally missed that the svn_node_kind_t
> type could both describe an entry and and what actually is on the disk.

Welcome to the pile of subtlety known as libsvn_wc :-P

>  The error returned from get_entry_versioned() is determined like this:
> * subversion/libsvn_wc/entries.c (svn_wc__get_entry_versioned)
>  if (err && (err->apr_err == SVN_ERR_WC_MISSING
>                 || err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND
>                 || err->apr_err == SVN_ERR_NODE_UNEXPECTED_KIND))
>     {
>        svn_error_clear(err);
>        *entry = NULL;
>     }
> ....
>  if (! *entry)
>     return svn_error_createf(SVN_ERR_ENTRY_NOT_FOUND, NULL,
>                              _("'%s' is not under version control"),
>                              svn_dirent_local_style(local_abspath,
>                                                     scratch_pool));

Right. In this case, the error computation might actually be wrong. If
you state a kind, but get back something else, then it simply
"pretends" the node is not versioned. That is probably wrong.

Regardless of the error handling here, the base issue is that
svn_wc__get_entry() takes a kind representative of the *expected
entry*, and should be changed.

> I created the svn_wc__maybe_get_entry() under the assumption that the
> unexpected errors in the test suite when a NULL entry was expected
> required a changed return semantics.

The existence of maybe_get_entry() is just fine...

> Can I make a new patch and just change the KIND parameter to a proper
> value?

Well, certainly. Patches should always be generated against trunk/ and
your prior patch has now been committed.


Received on 2009-08-27 00:06:13 CEST

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.