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

Re: svn_wc_adm_probe_try3 docstring question

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 16 Apr 2009 15:54:13 +0200

On Thu, Apr 16, 2009 at 14:56, Edmund Wong <ed_at_kdtc.net> wrote:
>...
> If I understand it correctly, the process is as follows:
>
>   1) obtain adm_access via svn_wc_adm_probe_retrieve()
>   2) if it fails because associated can't give a baton
>      for path or path's parent, then try svn_wc_adm_probe_open3()
>      with write_lock and levels_to_lock as parameters.
>   3) If there is still no access because path is not a versioned
>      directory, then set adm_access to NULL and return success.
>
> Pardon my density (of a neutron star), but if it failed on
> all those accounts, why is a 'success' being returned and
> not some error?  It can't retrieve anything because of the
> failures, so wouldn't an error be suitable?

I believe it is because the design of that API assumes it is a
"forgivable problem". The caller is *trying* to acquire an access
baton, but if it can't get one, then the caller can decide what to do
with that information.

> Thanks for any clarifications in this.

Not a problem. I'll just warn you, though, that the access baton code
is *going away*. It is overly-complicated and under-specified. There
are some pretty crazy subtleties in how access batons are used and
managed.

Instead, the svn_wc.h code is going to switch to something closer to
libsvn_wc/wc_db.h. The latter is a private header, but its concepts
and patterns are very close to what I'd like to see in a revamped
svn_wc.h.

>...
> PS: While I'm on the topic of svn_wc.h,  if I find a
>     docstring 'error', who do I report it to?  Thanks

This mailing list. There are no "owners" of that header, other than
the developers on this list, as a whole.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1747996
Received on 2009-04-16 15:54:51 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.