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

Re: svn commit: rev 5663 - in trunk/subversion: include libsvn_client libsvn_subr libsvn_wc

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2003-04-18 17:13:17 CEST

cmpilato@collab.net writes:
> > > + if (err)
> > > + {
> > > + svn_error_clear (err);
> > > + dir_access = NULL;
> > > + entry = NULL;
> > > + }
> > > + else
> > > + SVN_ERR (svn_wc_entry (&entry, path, dir_access, FALSE, pool));
> > >
> > > - SVN_ERR (svn_wc_entry (&entry, path, dir_access, FALSE, pool));
> > > if (!entry)
> > > return erase_unversioned_from_wc (path, cancel_func, cancel_baton, pool);
> >
> > This logic is different. Before, if there was a failure retrieving the
> > access baton, the function would simply return. Now, if you get a failure,
> > then 'entry' is set to NULL and we continue with the function.
>
> Oh! Good catch. Karl, wanna take care of that?

Well, the logics should be different, as the old logic was bogus (it
depended on callers having an tree-locked access baton for the target
tree in adm_access's associated set, which was an undocumented and
inappropriate requirement).

But the new logic is bogus because it's not checking for a specific
error. For example, it might treat the tree as unversioned when what
really happened was that the tree was locked by someone else. If it
fails to get a baton, we need to check *why* it failed. As long as
the reason is that we were requesting an access baton for an
unversioned tree, then we can set entry to NULL and proceed;
otherwise, we should return an error.

Does that seem sensible to you too?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 18 17:58:07 2003

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.