=== build/ac-macros/serf.m4 ================================================================== --- build/ac-macros/serf.m4 (revision 148316) +++ build/ac-macros/serf.m4 (local) @@ -15,9 +15,6 @@ if test "$withval" = "yes" ; then AC_MSG_ERROR([--with-serf requires an argument.]) else - if test "$svn_lib_neon" = "yes"; then - AC_MSG_ERROR([neon and serf can't be used at the same time.]) - fi AC_MSG_NOTICE([serf library configuration]) serf_prefix=$withval save_cppflags="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES" === subversion/include/svn_config.h ================================================================== --- subversion/include/svn_config.h (revision 148316) +++ subversion/include/svn_config.h (local) @@ -72,6 +72,7 @@ #define SVN_CONFIG_OPTION_SSL_TRUST_DEFAULT_CA "ssl-trust-default-ca" #define SVN_CONFIG_OPTION_SSL_CLIENT_CERT_FILE "ssl-client-cert-file" #define SVN_CONFIG_OPTION_SSL_CLIENT_CERT_PASSWORD "ssl-client-cert-password" +#define SVN_CONFIG_OPTION_HTTP_LIBRARY "http-library" #define SVN_CONFIG_CATEGORY_CONFIG "config" #define SVN_CONFIG_SECTION_AUTH "auth" === subversion/libsvn_ra/ra_loader.c ================================================================== --- subversion/libsvn_ra/ra_loader.c (revision 148316) +++ subversion/libsvn_ra/ra_loader.c (local) @@ -35,15 +35,21 @@ #include "svn_xml.h" #include "svn_path.h" #include "svn_dso.h" +#include "svn_config.h" #include "ra_loader.h" #include "svn_private_config.h" -/* ### this file maps URL schemes to particular RA libraries. This is not - ### entirely correct, as a single scheme could potentially be served - ### by more than one loader. However, we can ignore that until we - ### actually run into a conflict within the scheme portion of a URL. */ +/* ### This file maps URL schemes to particular RA libraries. + ### Currently, the only pair of RA libraries which support the same + ### protocols are dav and serf. svn_ra_open2 makes the assumption + ### that this is the case; that their 'schemes' fields are both + ### dav_schemes; and that "dav" is listed first. */ +#if defined(SVN_LIBSVN_CLIENT_LINKS_RA_DAV) && defined (SVN_LIBSVN_CLIENT_LINKS_RA_SERF) +#define MUST_CHOOSE_DAV +#endif + /* These are the URI schemes that the respective libraries *may* support. * The schemes actually supported may be a subset of the schemes listed below. @@ -369,7 +375,26 @@ svn_ra_session_t *session; const struct ra_lib_defn *defn; const svn_ra__vtable_t *vtable = NULL; +#ifdef MUST_CHOOSE_DAV + svn_config_t *servers = NULL; + const char *http_library = "dav"; + if (config) + { + servers = apr_hash_get(config, SVN_CONFIG_CATEGORY_SERVERS, + APR_HASH_KEY_STRING); + if (servers) + { + svn_config_get(servers, &http_library, SVN_CONFIG_SECTION_GLOBAL, + SVN_CONFIG_OPTION_HTTP_LIBRARY, "dav"); + if (strcmp(http_library, "dav") != 0 && + strcmp(http_library, "serf") != 0) + return svn_error_create(SVN_ERR_RA_DAV_INVALID_CONFIG_VALUE, NULL, + _("Invalid config: unknown HTTP library")); + } + } +#endif + /* Find the library. */ for (defn = ra_libraries; defn->ra_name != NULL; ++defn) { @@ -379,6 +404,12 @@ { svn_ra__init_func_t initfunc = defn->initfunc; +#ifdef MUST_CHOOSE_DAV + if (defn->schemes == dav_schemes + && strcmp(defn->ra_name, http_library) != 0) + continue; +#endif + if (! initfunc) SVN_ERR(load_ra_module(&initfunc, NULL, defn->ra_name, pool)); === subversion/libsvn_subr/config_file.c ================================================================== --- subversion/libsvn_subr/config_file.c (revision 148316) +++ subversion/libsvn_subr/config_file.c (local) @@ -792,6 +792,9 @@ "### ssl-client-cert-file PKCS#12 format client certificate file" NL "### ssl-client-cert-password Client Key password, if needed." NL + "### http-library Which library to use for http/https" + NL + "### connections (dav or serf)" NL "###" NL "### HTTP timeouts, if given, are specified in seconds. A timeout" NL "### of 0, i.e. zero, causes a builtin default to be used." NL