Let's move this to its own thread, with catchy subject.
--dave
---------- Forwarded message ----------
From: David Glasser <glasser@mit.edu>
Date: Jun 12, 2007 8:14 AM
Subject: Re: Serf as default DAV client?
To: Daniel Rall <dlr@collab.net>
Cc: Eric Gillespie <epg@pretzelnet.org>, dev@subversion.tigris.org
On 6/11/07, Daniel Rall <dlr@collab.net> 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
servers file?
Anyway, here is a preliminary patch to support building both ra_dav
and ra_serf and choosing which one in the servers file:
Some issues:
* 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.
* build/ac-macros/serf.m4:
Remove check that prevents building both ra_dav and ra_serf.
* subversion/include/svn_config.h
(SVN_CONFIG_OPTION_HTTP_LIBRARY): New config option "http-library".
* subversion/libsvn_subr/config_file.c
(svn_config_ensure): Document SVN_CONFIG_OPTION_HTTP_LIBRARY in the
generated servers file.
* subversion/libsvn_ra/ra_loader.c
(): 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
libraries.
(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/
--
David Glasser | glasser_at_mit.edu | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 12 16:45:53 2007