Author: rinrab
Date: Fri Sep 4 17:47:07 2026
New Revision: 1937882
Log:
On the 'reparentless' branch: Remove compat RA plugins.
Even if we don't decide to remove it in the trunk, it would at least help to
focus on the goals of this branch instead of trying to make all this outdated
legacy code work.
* 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.
Deleted:
subversion/branches/reparentless/subversion/libsvn_ra/wrapper_template.h
Modified:
subversion/branches/reparentless/subversion/libsvn_ra/deprecated.c
subversion/branches/reparentless/subversion/libsvn_ra/ra_loader.c
subversion/branches/reparentless/subversion/libsvn_ra_local/ra_init.h
subversion/branches/reparentless/subversion/libsvn_ra_local/ra_plugin.c
subversion/branches/reparentless/subversion/libsvn_ra_serf/ra_init.h
subversion/branches/reparentless/subversion/libsvn_ra_serf/serf.c
subversion/branches/reparentless/subversion/libsvn_ra_svn/client.c
subversion/branches/reparentless/subversion/libsvn_ra_svn/ra_init.h
subversion/branches/reparentless/subversion/tests/libsvn_ra/ra-test.c
Modified: subversion/branches/reparentless/subversion/libsvn_ra/deprecated.c
==============================================================================
--- subversion/branches/reparentless/subversion/libsvn_ra/deprecated.c Fri Sep
4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/libsvn_ra/deprecated.c Fri Sep
4 17:47:07 2026 (r1937882)
@@ -592,11 +592,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 *
@@ -604,11 +600,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 *
@@ -616,9 +608,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/branches/reparentless/subversion/libsvn_ra/ra_loader.c
==============================================================================
--- subversion/branches/reparentless/subversion/libsvn_ra/ra_loader.c Fri Sep
4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/libsvn_ra/ra_loader.c Fri Sep
4 17:47:07 2026 (r1937882)
@@ -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
},
@@ -1535,43 +1531,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/branches/reparentless/subversion/libsvn_ra_local/ra_init.h
==============================================================================
--- subversion/branches/reparentless/subversion/libsvn_ra_local/ra_init.h
Fri Sep 4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/libsvn_ra_local/ra_init.h
Fri Sep 4 17:47:07 2026 (r1937882)
@@ -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/branches/reparentless/subversion/libsvn_ra_local/ra_plugin.c
==============================================================================
--- subversion/branches/reparentless/subversion/libsvn_ra_local/ra_plugin.c
Fri Sep 4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/libsvn_ra_local/ra_plugin.c
Fri Sep 4 17:47:07 2026 (r1937882)
@@ -1989,11 +1989,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/branches/reparentless/subversion/libsvn_ra_serf/ra_init.h
==============================================================================
--- subversion/branches/reparentless/subversion/libsvn_ra_serf/ra_init.h
Fri Sep 4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/libsvn_ra_serf/ra_init.h
Fri Sep 4 17:47:07 2026 (r1937882)
@@ -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/branches/reparentless/subversion/libsvn_ra_serf/serf.c
==============================================================================
--- subversion/branches/reparentless/subversion/libsvn_ra_serf/serf.c Fri Sep
4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/libsvn_ra_serf/serf.c Fri Sep
4 17:47:07 2026 (r1937882)
@@ -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/branches/reparentless/subversion/libsvn_ra_svn/client.c
==============================================================================
--- subversion/branches/reparentless/subversion/libsvn_ra_svn/client.c Fri Sep
4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/libsvn_ra_svn/client.c Fri Sep
4 17:47:07 2026 (r1937882)
@@ -3408,11 +3408,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/branches/reparentless/subversion/libsvn_ra_svn/ra_init.h
==============================================================================
--- subversion/branches/reparentless/subversion/libsvn_ra_svn/ra_init.h Fri Sep
4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/libsvn_ra_svn/ra_init.h Fri Sep
4 17:47:07 2026 (r1937882)
@@ -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/branches/reparentless/subversion/tests/libsvn_ra/ra-test.c
==============================================================================
--- subversion/branches/reparentless/subversion/tests/libsvn_ra/ra-test.c
Fri Sep 4 17:45:09 2026 (r1937881)
+++ subversion/branches/reparentless/subversion/tests/libsvn_ra/ra-test.c
Fri Sep 4 17:47:07 2026 (r1937882)
@@ -1916,49 +1916,6 @@ test_get_deleted_rev_errors(const svn_te
}
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;
-}
-
-static svn_error_t *
test_reparent(const svn_test_opts_t *opts,
apr_pool_t *pool)
{
@@ -2062,8 +2019,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_OPTS_PASS(test_reparent,
"test session reparent"),
SVN_TEST_NULL