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,
Vijayaguru
Received on 2012-11-20 11:27:37 CET