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

Re: Layering violations in the FS cache code? (was "svn commit: r1091573 - /subversion/trunk/build.conf")

From: Stefan Fuhrmann <eqfox_at_web.de>
Date: Thu, 21 Apr 2011 01:40:17 +0200

On 18.04.2011 21:09, C. Michael Pilato wrote:
> On 04/16/2011 08:40 AM, Stefan Fuhrmann wrote:
>> On 14.04.2011 22:32, Branko ─îibej wrote:
>>> On 14.04.2011 21:03, Daniel Shahaf wrote:
>>>> On Thu, 14 Apr 2011 14:43 -0400, "C. Michael Pilato"<cmpilato_at_collab.net> wrote:
>>>>> I'm honestly not quite sure exactly where the right place is. I don't
>>>>> really see what moving it to libsvn_fs does for us -- IMO, it's still
>>>>> wrong for svn_ra_initialize() call into that. (libsvn_ra should only
>>>>> call into libsvn_subr, libsvn_delta, and its own RA provider vtable.)
>>>> Would svn_cmdline_init() be a better place to call the init
>>>> function from?
>>> Clearly not, since that function is a startup helper for command-line
>>> programs, not for libraries.
>> There seem to be two separate questions to answer:
>> (1) Where to put the functionality?
>> (2) Where to call it?
>> I get the impression that there is some consensus that
>> the answer to (1) is libsvn_subr.
> Works for me.
>> The answer to the second one is more difficult. To default-
>> override the default settings this must be done early, i.e.
>> before they will be evaluated / used. And clients like TSVN
>> must be able to change the settings after the client libs
>> changed the defaults and before the settings get used.
>> Since the changed default is only relevant for time-critical
>> clients, i.e. those being run many times automatically, e.g.
>> as part of some script. IMHO, it would be fine to simply
>> move the override code to the SVN.EXE main(). This would
>> also make it symmetric to svnadmin and svnserve.
> So ... do you literally mean main(), or are you back to the suggestion of
> using svn_cmdline_init()?
Literally main(). Setting up caching limits etc. is similar
to creating the apr root pool and limiting its allocator -
which is done inside main().

Also, this is clearly tool-specific as svn.exe seems to be
the only tool that would want to disable the membuffer
cache. A central function like svn_cmdline_init() would
be inappropriate.

-- Stefan^2.
Received on 2011-04-21 01:40:43 CEST

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.