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

Re: svn client api comments

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-03-11 02:50:51 CET

On Mar 10, 2005, at 5:15 PM, Barry Scott wrote:

>
> On Mar 9, 2005, at 23:53, Ben Collins-Sussman wrote:
>
>>
>> On Mar 9, 2005, at 5:43 PM, Barry Scott wrote:
>>>
>>> svn_client_ls cannot return info on a directory. It always lists the
>>> contents of a directory.
>>>
>>
>> There's now an svn_ra_stat() in /trunk (upcoming 1.2) for this. It
>> returns exactly one svn_dirent_t.
>
> Good. So will svn_client_ls be change to use it?

At the moment, svn_client_info() is the only user of svn_ra_stat().

svn_client_ls() could certainly be optimized to call svn_ra_stat() when
fetching a single file. Wanna submit a patch? :-)

>
>>
>>> no way to find the root of a repository - which means that info from
>>> changed paths
>>> is hard to use as its repo root relative.
>>
>> Huh? RA->get_repos_root() has been around for quite a while.
>
> But there is no svn_client API to get the info.
>
> The beauty if the svn_client API is that I can avoid digging deep into
> the SVN code.
>
> I hope you are not advocating that users should avoid svn_client and
> write their
> own functions based on the deeper APIs to get rounded functionality?
>
>

Well, we have multiple APIs. There's svn_wc.h, there's svn_ra.h, and
there's svn_client.h The client API makes calls into WC and RA, but
there's certainly nothing "off limits" about svn_wc.h and svn_ra.h. In
fact, I think it's essentially impossible to write a client without
using svn_wc.h to some degree. Go ahead and use svn_ra.h if you want
to.

Despite what cmpilato has said, I disagree with him on this point.
svn_ra.h is a "set of questions" that an application might want to ask
a repository. It's not meant to be secret, or hidden, and there's most
definitely not a 1-to-1 relationship between svn_ra.h and svn_client.h.

In other words, you don't need to sit around and wait for somebody to
write an svn_client.h "wrapper" around svn_ra_get_repos_root(). It's
never going to happen... there's just no reason for such a thing to
exist. svn_client.h defines "high level" functionality for clients,
mainly by using the smaller calls in WC and RA. But it certainly
doesn't wrap every little operation in svn_wc.h and svn_ra.h. If you
need smaller operations in those libraries, use them! That's why they
exist.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 11 02:52:05 2005

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.