/* This implements the fs_library_vtable_t.hotcopy() API. Copy a possibly live Subversion filesystem SRC_FS from SRC_PATH to a DST_FS at DEST_PATH. If INCREMENTAL is TRUE, make an effort not to re-copy data which already exists in DST_FS. The CLEAN_LOGS argument is ignored and included for Subversion 1.0.x compatibility. Perform all temporary allocations in POOL. */ static svn_error_t * fs_hotcopy(svn_fs_t *src_fs, svn_fs_t *dst_fs, const char *src_path, const char *dst_path, svn_boolean_t clean_logs, svn_boolean_t incremental, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool) { SVN_ERR(svn_fs__check_fs(src_fs, FALSE)); SVN_ERR(initialize_fs_struct(src_fs)); SVN_ERR(svn_fs_fs__open(src_fs, src_path, pool)); SVN_ERR(svn_fs_fs__initialize_caches(src_fs, pool)); SVN_ERR(fs_serialized_init(src_fs, pool, pool)); SVN_ERR(svn_fs__check_fs(dst_fs, FALSE)); SVN_ERR(initialize_fs_struct(dst_fs)); /* In INCREMENTAL mode, svn_fs_fs__hotcopy() will open DST_FS. Otherwise, it's not an FS yet --- possibly just an empty dir --- so can't be opened. */ return svn_fs_fs__hotcopy(src_fs, dst_fs, src_path, dst_path, incremental, cancel_func, cancel_baton, pool); }
/* This implements the fs_library_vtable_t.open() API. Open an FSFS Subversion filesystem located at PATH, set *FS to point to the correct vtable for the filesystem. Use POOL for any temporary allocations, and COMMON_POOL for fs-global allocations. */ static svn_error_t * fs_open(svn_fs_t *fs, const char *path, apr_pool_t *pool, apr_pool_t *common_pool) { initialize_fs_struct(fs); SVN_ERR(svn_fs_fs__open(fs, path, pool)); return fs_serialized_init(fs, common_pool, pool); }
/* This implements the fs_library_vtable_t.uprade_fs() API. */ static svn_error_t * fs_upgrade(svn_fs_t *fs, const char *path, apr_pool_t *pool, apr_pool_t *common_pool) { SVN_ERR(svn_fs__check_fs(fs, FALSE)); initialize_fs_struct(fs); SVN_ERR(svn_fs_fs__open(fs, path, pool)); SVN_ERR(fs_serialized_init(fs, common_pool, pool)); return svn_fs_fs__upgrade(fs, pool); }
/* This implements the fs_library_vtable_t.create() API. Create a new fsfs-backed Subversion filesystem at path PATH and link it into *FS. Perform temporary allocations in POOL, and fs-global allocations in COMMON_POOL. */ static svn_error_t * fs_create(svn_fs_t *fs, const char *path, apr_pool_t *pool, apr_pool_t *common_pool) { SVN_ERR(svn_fs__check_fs(fs, FALSE)); SVN_ERR(initialize_fs_struct(fs)); SVN_ERR(svn_fs_fs__create(fs, path, pool)); SVN_ERR(svn_fs_fs__initialize_caches(fs, pool)); return fs_serialized_init(fs, common_pool, pool); }
static svn_error_t * fs_pack(svn_fs_t *fs, const char *path, svn_fs_pack_notify_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool) { SVN_ERR(svn_fs__check_fs(fs, FALSE)); SVN_ERR(initialize_fs_struct(fs)); SVN_ERR(svn_fs_fs__open(fs, path, pool)); SVN_ERR(svn_fs_fs__initialize_caches(fs, pool)); SVN_ERR(fs_serialized_init(fs, pool, pool)); return svn_fs_fs__pack(fs, notify_func, notify_baton, cancel_func, cancel_baton, pool); }
static svn_error_t * fs_verify(svn_fs_t *fs, const char *path, svn_revnum_t start, svn_revnum_t end, svn_fs_progress_notify_func_t notify_func, void *notify_baton, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool, apr_pool_t *common_pool) { SVN_ERR(svn_fs__check_fs(fs, FALSE)); SVN_ERR(initialize_fs_struct(fs)); SVN_ERR(svn_fs_fs__open(fs, path, pool)); SVN_ERR(svn_fs_fs__initialize_caches(fs, pool)); SVN_ERR(fs_serialized_init(fs, common_pool, pool)); return svn_fs_fs__verify(fs, start, end, notify_func, notify_baton, cancel_func, cancel_baton, pool); }
/* This implements the fs_library_vtable_t.create() API. Create a new fsfs-backed Subversion filesystem at path PATH and link it into *FS. Perform temporary allocations in POOL, and fs-global allocations in COMMON_POOL. The latter must be serialized using COMMON_POOL_LOCK. */ static svn_error_t * fs_create(svn_fs_t *fs, const char *path, svn_mutex__t *common_pool_lock, apr_pool_t *pool, apr_pool_t *common_pool) { SVN_ERR(svn_fs__check_fs(fs, FALSE)); SVN_ERR(initialize_fs_struct(fs)); SVN_ERR(svn_fs_fs__create(fs, path, pool)); SVN_ERR(svn_fs_fs__initialize_caches(fs, pool)); SVN_MUTEX__WITH_LOCK(common_pool_lock, fs_serialized_init(fs, common_pool, pool)); return SVN_NO_ERROR; }