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

Re: svn commit: r25517 - in trunk/subversion: include libsvn_client

From: Lieven Govaerts <svnlgo_at_mobsol.be>
Date: 2007-06-27 00:08:10 CEST

Malcolm Rowe wrote:
> Hi Lieven,
>
> On Sat, Jun 23, 2007 at 11:45:34AM -0700, lgo@tigris.org wrote:
>
>> Fix backwards compatibility issue with svn_client_status2.
>>
>>
>> --- trunk/subversion/include/svn_types.h (original)
>> +++ trunk/subversion/include/svn_types.h Sat Jun 23 11:45:34 2007
>> @@ -300,6 +300,20 @@
>> #define SVN_DEPTH_FROM_RECURSE(recurse) \
>> ((recurse) ? svn_depth_infinity : svn_depth_files)
>>
>> +
>> +/* Return an @c svn_depth_t depth based on boolean @a recurse.
>> + * Use this only for the status command, as it has a unique interpretation
>> + * of recursion.
>> + *
>> + * @note New code should never need to use this, it is called only
>> + * from pre-depth APIs, for compatibility.
>> + *
>> + * @since New in 1.5.
>> + */
>> +#define SVN_DEPTH_FROM_RECURSE_STATUS(recurse) \
>> + ((recurse) ? svn_depth_infinity : svn_depth_immediates)
>> +
>> +
>>
>
> It strikes me that a public macro that says "don't use this" isn't
> particularly useful to other users of the API. Is there any reason not
> to just inline the definition into the single place it's used?
>
Malcolm, thanks for the review.

There is a second place in which this macro should be used, that's in
svn/main.c 1609. But I forgot to change it, so thx for the reminder! ;)

The reason why I added a second macro is to make it clear to users of
the SVN_DEPTH_FROM_RECURSE macro that it doesn't give the correct
results in all cases, more specifically when working with status.

AFAIC, neither of the two need to be in a public interface, are there
better options?

Lieven

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 27 00:03:55 2007

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.