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

Re: [PATCH] Implement '--include-externals' option to 'svn list'

From: vijay <vijay_at_collab.net>
Date: Tue, 20 Nov 2012 15:56:58 +0530

On Thursday 15 November 2012 08:10 PM, C. Michael Pilato wrote:
> On 11/15/2012 03:47 AM, Bert Huijben wrote:
>>>> Can't you just add the new argument to every call to list_func() that
>>>> applies to an external?
>>> There is no separate list_func() call to list external items. We are
>>> just calling svn_client_list3() recursively for each external, which in
>>> turn calls list_func() using get_dir_contents(). I am struggling a bit
>>> hard to carry forward external information via svn_client_list3(). Can
>>> we add two more arguments external_parent_url and external_target to
>>> svn_client_list3()?
>> You could just create a static function with those extra arguments and make
>> the outer svn_client_list3() call into that function.
>> Please try to avoid adding implementation details to the public api, unless
>> absolutely necessary.
>> (We have such wrappers in almost every case where we use externals)
>> This model would also allow future improvements like re-using the
>> ra-session, without updating the public function prototype.
> Right. The pattern (to the degree that there is one) would have you
> creating a function named something like svn_client__list_internal(), which
> has all the code from svn_client_list3() plus the extra (optional)
> parameters and functionality you need. svn_client_list3() then becomes a
> thin wrapper around that function.

Thanks Bert and C-Mike. I have created a new function
svn_client__list_internal() with the parameters I need and made
svn_client_list3() as a wrapper around that function.

Thanks & Regards,
Received on 2012-11-20 11:27:37 CET

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