Without really knowing the svn API, using plain svn_fs_open() complained
about a missing /foo/DB_CONFIG even on fsfs type repos. Use
svn_repos_open() to open the repo and use svn_repos_fs() to get the fs
instead of using svn_fs_open() since even the headers say I wouldn't
want to use it directly... and they're right, obviously. :)
Signed-off-by: Rocco Rutte <pdmef@gmx.net>
SVN ?= /usr/local/svn
APR_INCLUDES ?= /usr/include/apr-1.0
CFLAGS += -I${APR_INCLUDES} -I${SVN}/include/subversion-1 -pipe -O2 -std=c99
SVN ?= /usr/local/svn
APR_INCLUDES ?= /usr/include/apr-1.0
CFLAGS += -I${APR_INCLUDES} -I${SVN}/include/subversion-1 -pipe -O2 -std=c99
-LDFLAGS += -L${SVN}/lib -lsvn_fs-1
+LDFLAGS += -L${SVN}/lib -lsvn_fs-1 -lsvn_repos-1
all: svn-fast-export svn-archive
all: svn-fast-export svn-archive
#include <apr_general.h>
#include <svn_fs.h>
#include <apr_general.h>
#include <svn_fs.h>
#include <svn_pools.h>
#include <svn_types.h>
#include <svn_pools.h>
#include <svn_types.h>
{
apr_pool_t *pool, *subpool;
svn_fs_t *fs;
{
apr_pool_t *pool, *subpool;
svn_fs_t *fs;
svn_revnum_t youngest_rev, min_rev, max_rev, rev;
pool = svn_pool_create(NULL);
SVN_ERR(svn_fs_initialize(pool));
svn_revnum_t youngest_rev, min_rev, max_rev, rev;
pool = svn_pool_create(NULL);
SVN_ERR(svn_fs_initialize(pool));
- SVN_ERR(svn_fs_open(&fs, repos_path, NULL, pool));
+ SVN_ERR(svn_repos_open(&repos, repos_path, pool));
+ if ((fs = svn_repos_fs(repos)) == NULL)
+ return -1;
SVN_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));
min_rev = 1;
SVN_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));
min_rev = 1;