[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: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 5 Dec 2012 13:28:27 +0100

> -----Original Message-----
> From: Julian Foad [mailto:julianfoad_at_btopenworld.com]
> Sent: woensdag 5 december 2012 02:45
> To: Bert Huijben
> Cc: Subversion Development
> Subject: Re: Combine and rename WC APIs that check WC root and switched
>
> 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.

I don't see a real problem with a function that checks for several kinds of root, and returns different answers that allows you to determine what a root is for you.
(Thanks for the current changes)

Why create such a long function name?

I'm not sure if it tells more than the current name, and it is not complete either.

 svn_wc_check_wcroot_switched_and_kind(), would be complete but I don't think it really adds something; the usage of the separate optional output arguments already tells that you know what the function does.

        Bert

PS. If we want to crash the compilers and break the 80 character linewidth we can also rename svn_wc__db_read_read info to show all its arguments in its name ;-)
Received on 2012-12-05 13:29:19 CET

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