summaryrefslogtreecommitdiff
path: root/svn-fast-export.c
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2007-03-14 15:35:33 +0000
committerRocco Rutte <pdmef@gmx.net>2007-03-14 15:35:33 +0000
commitbca24a3468484d5ff955849101e5935deabaf77d (patch)
tree237c5681b0b9bc10a95cfdf6b65b026d9f3349b2 /svn-fast-export.c
parente25b88e15f561ea7fb62e501c5abb293211a1ab1 (diff)
downloadhg-fast-export-bca24a3468484d5ff955849101e5935deabaf77d.tar.gz
Obtain svn_fs_t via svn_repos_open() -> svn_repos_fs()
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>
Diffstat (limited to 'svn-fast-export.c')
-rw-r--r--svn-fast-export.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/svn-fast-export.c b/svn-fast-export.c
index 2d71627..34e7fc6 100644
--- a/svn-fast-export.c
+++ b/svn-fast-export.c
@@ -23,6 +23,7 @@
#include <apr_general.h>
#include <svn_fs.h>
+#include <svn_repos.h>
#include <svn_pools.h>
#include <svn_types.h>
@@ -141,12 +142,15 @@ int crawl_revisions(char *repos_path)
{
apr_pool_t *pool, *subpool;
svn_fs_t *fs;
+ svn_repos_t *repos;
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;