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

Re: functions that would help TSVN

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 28 Feb 2011 09:22:04 -0500

On 02/27/2011 03:39 AM, Stefan Küng wrote:
> function to determine whether a path is part of a working copy.
> Currently I'm misusing svn_wc_check_wc2() for this, but I'd rather have a
> proper and fast svn_client_is_workingcopy(const char* path) function for this.

I've often wondered about this myself. Of all the "duh" functions you'd
think we'd offer, this one is pretty near the top. And yet folks typically
find themselves just messing around with check_wc() or status() or ...

> function to find the wc root path for a given path. I thought there must be
> such a function already but I couldn't find one.

There's this public one I added a few months ago or so:

svn_error_t *
svn_wc_get_wc_root(const char **wcroot_abspath,
                   svn_wc_context_t *wc_ctx,
                   const char *local_abspath,
                   apr_pool_t *scratch_pool,
                   apr_pool_t *result_pool);

I more than happy to make an svn_client wrapper for this, and demote this to
a private WC function, though!

> A new field in the svn_client_status_t struct which has the size of the file
> in the working copy, or -1 if not known. For most file this information
> should be available automatically since svn_client_status has to do a stat()
> call on the file anyway to determine its file time or at least when
> comparing the size to its BASE. So if that information is available, I'd
> like to reuse that info and not have to do a stat() call again later,
> basically doubling the stat() calls and therefore hurting the performance a
> lot.

Makes sense to me.

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on 2011-02-28 15:22:54 CET

This is an archived mail posted to the Subversion Dev mailing list.