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

Re: svn commit: r25997 - trunk/subversion/libsvn_ra_svn

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-08-10 15:52:36 CEST

Vlad Georgescu wrote:
> cmpilato@tigris.org wrote:
>> Author: cmpilato
>> Date: Wed Aug 8 13:56:45 2007
>> New Revision: 25997
>>
>> Log:
>> Sparse directories: Add the depth filtering wrapper editor to ra_svn,
>> too. This is for issue #2842.
>>
>> * subversion/libsvn_ra_svn/client.c
>> (ra_svn_get_reporter): Accept 'depth' and 'target' parameters. Wrap
>> the provided editor with a depth-filtering editor.
>> (normalize_depth_values): New helper function.
>> (ra_svn_update, ra_svn_switch, ra_svn_status, ra_svn_diff): Call
>> normalize_depth_values(). Update calls to ra_svn_get_reporter().
>>
>>
>> Modified:
>> trunk/subversion/libsvn_ra_svn/client.c
>>
>> [...]
>> +/* Set *RECURSE_P and *DEPTH to sane values based on DEPTH, the depth
>> + requested for an update-style editor drive operation. */
>> +static void refine_recurse_and_depth(svn_boolean_t *recurse_p,
>> + svn_depth_t *depth_p,
>> + svn_depth_t depth)
>> +{
>> + if (depth == svn_depth_unknown)
>> + depth = svn_depth_infinity;
>> + *recurse_p = depth > svn_depth_files ? TRUE : FALSE;
>> + *depth_p = depth;
>> +}
>> +
>
> This change makes a couple of depth tests fail over ra_svn.
> svn_depth_unknown is a valid requested depth and should not be converted
> to [svn_depth_infinity].

You're totally right. I want to do that conversion (svn_depth_unknown ->
svn_depth_infinity) for my filtering editor (which effectively disables it,
by the way), but *not* actually convert the depth value requested of the server.

> BTW, in the svn_depth_unknown case, is it even possible to filter stuff
> at the RA layer?

No, it's not. But the filtering doesn't happening for svn_depth_infinity()
anyway.

So, I now realize a couple of things I've done wrong, and the solutions:

   1. make my depth-filtering editor simply not filter for svn_depth_unknown
      instead of expecting callers to request "infinity" (and ignore that).

   2. undo the depth clobbering I've done in ra_svn.

Thanks, Vlad!

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Fri Aug 10 15:50:40 2007

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