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

Re: API change - make svn_tristate_to_word/_from_word() private?

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 16 Jun 2011 01:59:30 +0300

Stefan Fuhrmann wrote on Wed, Jun 15, 2011 at 21:29:32 +0200:
> On 15.06.2011 16:45, Daniel Shahaf wrote:
> >> * svnserve:main.c which uses it simply to detect whether a
> >>command-line option is "true"/"yes"/"on", and doesn't actually care
> >>about the tri-state-ness.
> >>
> Well, not specifying the parameter is equivalent to the 3rd state.

The code only cares whether the parameter was specified-and-"yes" or no.
It doesn't behave in three different ways for the three different values
of the parameter.

> But this check actually prompted me *not* to duplicate the
> comparison code again but to factor it out to some common
> utility function. Even 3rd party coders might find it helpful.
> >Why does that svnserve option take a string argument? If it's just
> >a boolean why not do
> >
> >- {"cache-txdeltas", SVNSERVE_OPT_CACHE_TXDELTAS, 1,
> >+ {"cache-txdeltas", SVNSERVE_OPT_CACHE_TXDELTAS, 0,
> >
> >?
> Because the default can be "true" / "on" and that default
> may change in later versions.

I hadn't considered that. Fair enough, assuming the documentation
agrees (ie, we don't promise what the default is).

> Furthermore, both options should have the same UI.

Received on 2011-06-16 01:00:13 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.