Index: subversion/libsvn_fs_base/fs.c =================================================================== --- subversion/libsvn_fs_base/fs.c (revision 24447) +++ subversion/libsvn_fs_base/fs.c (working copy) @@ -31,7 +31,6 @@ #include "svn_path.h" #include "svn_utf.h" #include "svn_delta.h" -#include "svn_version.h" #include "fs.h" #include "err.h" #include "dag.h" @@ -58,6 +57,7 @@ #include "../libsvn_fs/fs-loader.h" #include "private/svn_fs_merge_info.h" +#include "private/svn_fs_util.h" /* Checking for return values, and reporting errors. */ @@ -98,19 +98,6 @@ return SVN_NO_ERROR; } - -/* If FS is already open, then return an SVN_ERR_FS_ALREADY_OPEN - error. Otherwise, return zero. */ -static svn_error_t * -check_already_open(svn_fs_t *fs) -{ - if (fs->fsap_data) - return svn_error_create(SVN_ERR_FS_ALREADY_OPEN, 0, - _("Filesystem object already open")); - else - return SVN_NO_ERROR; -} - /* Cleanup functions. */ @@ -1166,12 +1153,6 @@ return SVN_NO_ERROR; } -static const svn_version_t * -base_version(void) -{ - SVN_VERSION_BODY; -} - static const char * base_get_description(void) { @@ -1182,7 +1163,7 @@ /* Base FS library vtable, used by the FS loader library. */ static fs_library_vtable_t library_vtable = { - base_version, + svn_fs__version, base_create, base_open, base_open_for_recovery, @@ -1211,7 +1192,7 @@ return svn_error_createf(SVN_ERR_VERSION_MISMATCH, NULL, _("Unsupported FS loader version (%d) for bdb"), loader_version->major); - SVN_ERR(svn_ver_check_list(base_version(), checklist)); + SVN_ERR(svn_ver_check_list(svn_fs__version(), checklist)); SVN_ERR(check_bdb_version()); SVN_ERR(svn_fs_bdb__init()); Index: subversion/libsvn_fs_util/fs-util.c =================================================================== --- subversion/libsvn_fs_util/fs-util.c (revision 24447) +++ subversion/libsvn_fs_util/fs-util.c (working copy) @@ -21,8 +21,13 @@ #include #include +#include "svn_fs.h" #include "svn_path.h" +#include "svn_version.h" +#include "svn_private_config.h" + #include "private/svn_fs_util.h" +#include "../libsvn_fs/fs-loader.h" const char * svn_fs__canonicalize_abspath(const char *path, apr_pool_t *pool) @@ -82,3 +87,19 @@ return newpath; } +svn_error_t * +check_already_open(svn_fs_t *fs) +{ + if (fs->fsap_data) + return svn_error_create(SVN_ERR_FS_ALREADY_OPEN, 0, + _("Filesystem object already open")); + else + return SVN_NO_ERROR; +} + +const svn_version_t * +svn_fs__version(void) +{ + SVN_VERSION_BODY; +} + Index: subversion/include/private/svn_fs_util.h =================================================================== --- subversion/include/private/svn_fs_util.h (revision 24447) +++ subversion/include/private/svn_fs_util.h (working copy) @@ -35,6 +35,15 @@ const char * svn_fs__canonicalize_abspath(const char *path, apr_pool_t *pool); +/* If filesystem is already open, then return an + SVN_ERR_FS_ALREADY_OPEN error. Otherwise, return zero. */ +svn_error_t * +check_already_open(svn_fs_t *fs); + +/* Return the library version number. */ +const svn_version_t * +svn_fs__version(void); + #ifdef __cplusplus } #endif /* __cplusplus */ Index: subversion/libsvn_fs_fs/fs.c =================================================================== --- subversion/libsvn_fs_fs/fs.c (revision 24447) +++ subversion/libsvn_fs_fs/fs.c (working copy) @@ -26,7 +26,6 @@ #include "svn_fs.h" #include "svn_delta.h" -#include "svn_version.h" #include "fs.h" #include "err.h" #include "dag.h" @@ -36,25 +35,13 @@ #include "svn_private_config.h" #include "../libsvn_fs/fs-loader.h" +#include "private/svn_fs_util.h" /* A prefix for the pool userdata variables used to hold per-filesystem shared data. See fs_serialized_init. */ #define SVN_FSFS_SHARED_USERDATA_PREFIX "svn-fsfs-shared-" - -/* If filesystem FS is already open, then return an - SVN_ERR_FS_ALREADY_OPEN error. Otherwise, return zero. */ -static svn_error_t * -check_already_open(svn_fs_t *fs) -{ - if (fs->fsap_data) - return svn_error_create(SVN_ERR_FS_ALREADY_OPEN, 0, - _("Filesystem object already open")); - else - return SVN_NO_ERROR; -} - static svn_error_t * @@ -278,12 +265,6 @@ return svn_io_remove_dir2(path, FALSE, pool); } -static const svn_version_t * -fs_version(void) -{ - SVN_VERSION_BODY; -} - static const char * fs_get_description(void) { @@ -295,7 +276,7 @@ /* Base FS library vtable, used by the FS loader library. */ static fs_library_vtable_t library_vtable = { - fs_version, + svn_fs__version, fs_create, fs_open, fs_open_for_recovery, @@ -323,7 +304,7 @@ return svn_error_createf(SVN_ERR_VERSION_MISMATCH, NULL, _("Unsupported FS loader version (%d) for fsfs"), loader_version->major); - SVN_ERR(svn_ver_check_list(fs_version(), checklist)); + SVN_ERR(svn_ver_check_list(svn_fs__version(), checklist)); *vtable = &library_vtable; return SVN_NO_ERROR;