Author: rinrab Date: Tue Sep 15 12:36:22 2026 New Revision: 1938248 Log: Remove compat RA plugins (svn_ra_plugin_t).
The API has been deprecated since 1.1 (22 years ago). There are no tests on it and no users. Also it was completely broken for the past two major versions (at least). Does it go against our backward compatibility promise? No, it doesn't. The symbols do still exist, only they will return a "not implemented" error instead of actually initialising the modules - the same exact behaviour as if those modules were not built at all or if one would attempt to initialise ra_dav. * subversion/libsvn_ra/ra_loader.c (ra_lib_defn): Remove compat_initfunc field. (svn_ra_get_ra_library): Just return "not implemented". (svn_ra_serf_init, svn_ra_local_init, svn_ra_svn_init): Always return "not implemented" error. * subversion/libsvn_ra/wrapper_template.h: Delete. * subversion/libsvn_ra_local/ra_init.h, subversion/libsvn_ra_serf/ra_init.h, subversion/libsvn_ra_svn/ra_init.h (svn_ra_serf__compat_init, svn_ra_svn__compat_init, svn_ra_local__compat_init): Remove declarations. * subversion/libsvn_ra_local/ra_plugin.c, subversion/libsvn_ra_serf/serf.c, subversion/libsvn_ra_svn/client.c (): Don't setup wrapper_template. * subversion/tests/libsvn_ra/ra-test.c (test_compat_vtable): Remove this test. (test_funcs): Don't run test_compat_vtable. Discussed on [email protected]. [1] with a +1 from brane. [1] https://lists.apache.org/thread/1vyovwpp95ttnhb7fjc1k8bfjz0s3mtm Deleted: subversion/trunk/subversion/libsvn_ra/wrapper_template.h Modified: subversion/trunk/subversion/libsvn_ra/deprecated.c subversion/trunk/subversion/libsvn_ra/ra_loader.c subversion/trunk/subversion/libsvn_ra_local/ra_init.h subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c subversion/trunk/subversion/libsvn_ra_serf/ra_init.h subversion/trunk/subversion/libsvn_ra_serf/serf.c subversion/trunk/subversion/libsvn_ra_svn/client.c subversion/trunk/subversion/libsvn_ra_svn/ra_init.h subversion/trunk/subversion/tests/libsvn_ra/ra-test.c Modified: subversion/trunk/subversion/libsvn_ra/deprecated.c ============================================================================== --- subversion/trunk/subversion/libsvn_ra/deprecated.c Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/libsvn_ra/deprecated.c Tue Sep 15 12:36:22 2026 (r1938248) @@ -520,11 +520,7 @@ svn_ra_svn_init(int abi_version, apr_pool_t *pool, apr_hash_t *hash) { -#ifdef SVN_LIBSVN_RA_LINKS_RA_SVN - return svn_error_trace(svn_ra_svn__compat_init(abi_version, pool, hash)); -#else return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL); -#endif /* ! SVN_LIBSVN_RA_LINKS_RA_SVN */ } svn_error_t * @@ -532,11 +528,7 @@ svn_ra_local_init(int abi_version, apr_pool_t *pool, apr_hash_t *hash) { -#ifdef SVN_LIBSVN_RA_LINKS_RA_LOCAL - return svn_error_trace(svn_ra_local__compat_init(abi_version, pool, hash)); -#else return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL); -#endif /* ! SVN_LIBSVN_RA_LINKS_RA_LOCAL */ } svn_error_t * @@ -544,9 +536,5 @@ svn_ra_serf_init(int abi_version, apr_pool_t *pool, apr_hash_t *hash) { -#ifdef SVN_LIBSVN_RA_LINKS_RA_SERF - return svn_error_trace(svn_ra_serf__compat_init(abi_version, pool, hash)); -#else return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL); -#endif /* ! SVN_LIBSVN_RA_LINKS_RA_SERF */ } Modified: subversion/trunk/subversion/libsvn_ra/ra_loader.c ============================================================================== --- subversion/trunk/subversion/libsvn_ra/ra_loader.c Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/libsvn_ra/ra_loader.c Tue Sep 15 12:36:22 2026 (r1938248) @@ -78,14 +78,12 @@ static const struct ra_lib_defn { const char * const *schemes; /* the initialization function if linked in; otherwise, NULL */ svn_ra__init_func_t initfunc; - svn_ra_init_func_t compat_initfunc; } ra_libraries[] = { { "svn", svn_schemes, #ifdef SVN_LIBSVN_RA_LINKS_RA_SVN svn_ra_svn__init, - svn_ra_svn__compat_init #endif }, @@ -94,7 +92,6 @@ static const struct ra_lib_defn { local_schemes, #ifdef SVN_LIBSVN_RA_LINKS_RA_LOCAL svn_ra_local__init, - svn_ra_local__compat_init #endif }, @@ -103,7 +100,6 @@ static const struct ra_lib_defn { dav_schemes, #ifdef SVN_LIBSVN_RA_LINKS_RA_SERF svn_ra_serf__init, - svn_ra_serf__compat_init #endif }, @@ -1530,43 +1526,5 @@ svn_ra_get_ra_library(svn_ra_plugin_t ** const char *url, apr_pool_t *pool) { - const struct ra_lib_defn *defn; - apr_pool_t *load_pool = ra_baton; - apr_hash_t *ht = apr_hash_make(pool); - - /* Figure out which RA library key matches URL. */ - for (defn = ra_libraries; defn->ra_name != NULL; ++defn) - { - const char *scheme; - if ((scheme = has_scheme_of(defn->schemes, url))) - { - svn_ra_init_func_t compat_initfunc = defn->compat_initfunc; - - if (! compat_initfunc) - { - SVN_ERR(load_ra_module - (NULL, &compat_initfunc, defn->ra_name, load_pool)); - } - if (! compat_initfunc) - { - continue; - } - - SVN_ERR(compat_initfunc(SVN_RA_ABI_VERSION, load_pool, ht)); - - *library = svn_hash_gets(ht, scheme); - - /* The library may support just a subset of the schemes listed, - so we have to check here too. */ - if (! *library) - break; - - return check_ra_version((*library)->get_version(), scheme); - } - } - - /* Couldn't find a match... */ - *library = NULL; - return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL, - _("Unrecognized URL scheme '%s'"), url); + return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, NULL, NULL); } Modified: subversion/trunk/subversion/libsvn_ra_local/ra_init.h ============================================================================== --- subversion/trunk/subversion/libsvn_ra_local/ra_init.h Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/libsvn_ra_local/ra_init.h Tue Sep 15 12:36:22 2026 (r1938248) @@ -38,15 +38,4 @@ svn_error_t *svn_ra_local__init(const sv const svn_ra__vtable_t **vtable, apr_pool_t *pool); -/** - * Compatibility wrapper around svn_ra_local__init. - * - * Use @a pool for temporary allocations. - * - * @return @a hash with the scheme as the key and the vtable as the value. - */ -svn_error_t *svn_ra_local__compat_init(int abi_version, - apr_pool_t *pool, - apr_hash_t *hash); - #endif Modified: subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c ============================================================================== --- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Tue Sep 15 12:36:22 2026 (r1938248) @@ -1992,11 +1992,3 @@ svn_ra_local__init(const svn_version_t * return SVN_NO_ERROR; } - -/* Compatibility wrapper for the 1.1 and before API. */ -#define NAME "ra_local" -#define DESCRIPTION RA_LOCAL_DESCRIPTION -#define VTBL ra_local_vtable -#define INITFUNC svn_ra_local__init -#define COMPAT_INITFUNC svn_ra_local__compat_init -#include "../libsvn_ra/wrapper_template.h" Modified: subversion/trunk/subversion/libsvn_ra_serf/ra_init.h ============================================================================== --- subversion/trunk/subversion/libsvn_ra_serf/ra_init.h Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/libsvn_ra_serf/ra_init.h Tue Sep 15 12:36:22 2026 (r1938248) @@ -38,15 +38,4 @@ svn_error_t *svn_ra_serf__init(const svn const svn_ra__vtable_t **vtable, apr_pool_t *pool); -/** - * Compatibility wrapper around svn_ra_serf__init. - * - * Use @a pool for temporary allocations. - * - * @return @a hash with the scheme as the key and the vtable as the value. - */ -svn_error_t *svn_ra_serf__compat_init(int abi_version, - apr_pool_t *pool, - apr_hash_t *hash); - #endif Modified: subversion/trunk/subversion/libsvn_ra_serf/serf.c ============================================================================== --- subversion/trunk/subversion/libsvn_ra_serf/serf.c Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/libsvn_ra_serf/serf.c Tue Sep 15 12:36:22 2026 (r1938248) @@ -1130,11 +1130,3 @@ svn_ra_serf__init(const svn_version_t *l return SVN_NO_ERROR; } - -/* Compatibility wrapper for pre-1.2 subversions. Needed? */ -#define NAME "ra_serf" -#define DESCRIPTION RA_SERF_DESCRIPTION -#define VTBL serf_vtable -#define INITFUNC svn_ra_serf__init -#define COMPAT_INITFUNC svn_ra_serf__compat_init -#include "../libsvn_ra/wrapper_template.h" Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c ============================================================================== --- subversion/trunk/subversion/libsvn_ra_svn/client.c Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/libsvn_ra_svn/client.c Tue Sep 15 12:36:22 2026 (r1938248) @@ -3367,11 +3367,3 @@ svn_ra_svn__init(const svn_version_t *lo return SVN_NO_ERROR; } - -/* Compatibility wrapper for the 1.1 and before API. */ -#define NAME "ra_svn" -#define DESCRIPTION RA_SVN_DESCRIPTION -#define VTBL ra_svn_vtable -#define INITFUNC svn_ra_svn__init -#define COMPAT_INITFUNC svn_ra_svn__compat_init -#include "../libsvn_ra/wrapper_template.h" Modified: subversion/trunk/subversion/libsvn_ra_svn/ra_init.h ============================================================================== --- subversion/trunk/subversion/libsvn_ra_svn/ra_init.h Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/libsvn_ra_svn/ra_init.h Tue Sep 15 12:36:22 2026 (r1938248) @@ -38,15 +38,4 @@ svn_error_t *svn_ra_svn__init(const svn_ const svn_ra__vtable_t **vtable, apr_pool_t *pool); -/** - * Compatibility wrapper around svn_ra_svn__init. - * - * Use @a pool for temporary allocations. - * - * @return @a hash with the scheme as the key and the vtable as the value. - */ -svn_error_t *svn_ra_svn__compat_init(int abi_version, - apr_pool_t *pool, - apr_hash_t *hash); - #endif Modified: subversion/trunk/subversion/tests/libsvn_ra/ra-test.c ============================================================================== --- subversion/trunk/subversion/tests/libsvn_ra/ra-test.c Tue Sep 15 12:30:46 2026 (r1938247) +++ subversion/trunk/subversion/tests/libsvn_ra/ra-test.c Tue Sep 15 12:36:22 2026 (r1938248) @@ -1915,50 +1915,6 @@ test_get_deleted_rev_errors(const svn_te return SVN_NO_ERROR; } -static svn_error_t * -test_compat_vtable(const svn_test_opts_t *opts, - apr_pool_t *pool) -{ - svn_ra_plugin_t *lib; - void *ra_baton, *session_baton, *edit_baton, *root_baton, *dir_baton; - const svn_delta_editor_t *editor; - const char *url; - svn_ra_callbacks_t cbtable = { 0 }; - - SVN_ERR(svn_test__create_repos2(NULL, &url, NULL, "test_compat_vtable", opts, - pool, pool)); - SVN_ERR(svn_ra_initialize(pool)); - - SVN_ERR(svn_ra_init_ra_libs(&ra_baton, pool)); - SVN_ERR(svn_ra_get_ra_library(&lib, ra_baton, url, pool)); - - SVN_ERR(svn_test__init_auth_baton(&cbtable.auth_baton, pool)); - SVN_ERR(lib->open(&session_baton, url, &cbtable, NULL, NULL, pool)); - - /* mkdir A */ - SVN_ERR(lib->get_commit_editor(session_baton, &editor, &edit_baton, - "r1", NULL, NULL, pool)); - SVN_ERR(editor->open_root(edit_baton, SVN_INVALID_REVNUM, - pool, &root_baton)); - SVN_ERR(editor->add_directory("A", root_baton, NULL, SVN_INVALID_REVNUM, - pool, &dir_baton)); - SVN_ERR(editor->close_directory(dir_baton, pool)); - SVN_ERR(editor->close_directory(root_baton, pool)); - SVN_ERR(editor->close_edit(edit_baton, pool)); - - /* delete A */ - SVN_ERR(lib->get_commit_editor(session_baton, &editor, &edit_baton, - "r2", NULL, NULL, pool)); - SVN_ERR(editor->open_root(edit_baton, SVN_INVALID_REVNUM, - pool, &root_baton)); - SVN_ERR(editor->delete_entry("A", SVN_INVALID_REVNUM, root_baton, pool)); - SVN_ERR(editor->close_directory(root_baton, pool)); - SVN_ERR(editor->close_edit(edit_baton, pool)); - - return SVN_NO_ERROR; -} - - /* The test table. */ static int max_threads = 4; @@ -1998,8 +1954,6 @@ static struct svn_test_descriptor_t test "test get-deleted-rev no delete"), SVN_TEST_OPTS_PASS(test_get_deleted_rev_errors, "test get-deleted-rev errors"), - SVN_TEST_OPTS_PASS(test_compat_vtable, - "test compat svn_ra_plugin_t"), SVN_TEST_NULL };
