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

Re: Combine and rename WC APIs that check WC root and switched

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 5 Dec 2012 01:45:10 +0000 (GMT)

I (Julian Foad) wrote:

> Bert Huijben wrote:
>> 1 is new and should be the new public api (feel free to change
>> it to a better name and make 3 match it). 2 is the internal api
>> from before the introduction of 1 and 3.
>>  
>> 4 is the old ill-defined public api and 5 the better defined
>> variant. I would make these new functions just check for ‘wcroot’,
>> not ’strictly’ as that is just a pointer to the ill-definedness
>> which should be gone now.
>>
>> The wcroot is now just the root of the working copy, and not also
>> every switched subdir too as it used to be with the old apis.
>
> Thanks.  Will do.

>> Julian Foad wrote:
>>> These six APIs all overlap in functionality:
>>>
>>> 1) svn_wc_check_root(*is_wcroot,*is_switched,*kind,...)
>>>     2 uses in 2 files

Would it work to call (1) and (3) 'svn_wc...check_root_and_switched'?

It's a bit long but more accurate.

>>> 3) svn_wc__db_is_switched(*is_wcroot,*is_switched,*kind,...)
>>>     5 uses in 4 files
>>>
>>> 4) svn_wc_is_wc_root2(*wc_root,...)
>>>     1 use in 1 file (deprecated.c)
>>>
>>> 5) svn_wc__strictly_is_wc_root(*wc_root,...)
>>>     5 uses in 5 files

OK, I've renamed (5) to svn_wc__is_wcroot(), to match (6), in r1417261.

>>> 6) svn_wc__db_is_wcroot(*is_root,...)
>>>     15 uses in 6 files
[...]
>>> Now, (1) is a simple wrapper around (3) and (5) is a simple wrapper
>>> around (6). [...]
Received on 2012-12-05 02:45:48 CET

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