On 6/11/07, Daniel Rall <firstname.lastname@example.org> wrote:
> Looking at it another way, it's not a whole lot different than adding
> a new parameter to a rev'd API, and hard-coding a default value for
> the older incarnation of the API. So long as we document the
> behavior, I'd say we're okay.
OK. Should it be documented in the source, or actually in the default
Anyway, here is a preliminary patch to support building both ra_dav
and ra_serf and choosing which one in the servers file:
* The logic is hardcoded around assuming that the only conflicts are
ra_dav and ra_serf. I think that's fine for now.
* It only checks the [global] section, not the host-specific
sections. This is probably not acceptable (if we want to not have
host-specific preferences, then the pref should be in the main
config file, not the servers file). All the code to choose
sections is in libsvn_ra_dav, though.
* The error thrown if the http-library is unknown is in the
SVN_ERR_RA_DAV namespace. It's not entirely inappropriate though.
* The http-library value is validated on any use of any RA library,
even a non-http[s] one. I think that's OK though; nobody is going
to see that error unless they *just* tweaked the value.
* The fact that http-library is ignored by svn_ra_get_ra_library is
not documented anywhere.
Support building both ra_dav and ra_serf, allowing the user to choose
which one to use in their servers config file.
Remove check that prevents building both ra_dav and ra_serf.
(SVN_CONFIG_OPTION_HTTP_LIBRARY): New config option "http-library".
(svn_config_ensure): Document SVN_CONFIG_OPTION_HTTP_LIBRARY in the
generated servers file.
(): Change comment about conflicting RA libraries to mention the
assumptions that svn_ra_open2 is making.
(MUST_CHOOSE_DAV): Define this symbol if we are linking both DAV
(svn_ra_open2): If MUST_CHOOSE_DAV is defined, look up the
http-library value in the servers config file global section,
validate that it is "dav" or "serf", and skip the other library.
David Glasser | glasser_at_mit.edu | http://www.davidglasser.net/
Received on Tue Jun 12 14:14:36 2007
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org