[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: BDB vs FSFS API weirdness

From: Arkadiusz Miskiewicz <arekm_at_pld-linux.org>
Date: 2004-07-24 16:32:09 CEST

On Saturday 24 of July 2004 15:28, Arkadiusz Miskiewicz wrote:
> Hi,
>
> I noticed that mailer.py uses svn.fs.open_berkeley() that will not work
> with FSFS (if BDB+FSFS is compiled).
>
> svn.fs.open(self.fs_ptr, db_path, 'fsfs', pool) won't work here because
> types for open vs open_berkeley are different: _p_svn_fs_t, expected
> _p_p_svn_fs_t

This works fine. Tested.

Index: mailer.py
===================================================================
--- mailer.py (revision 4394)
+++ mailer.py (kopia robocza)
@@ -465,13 +465,12 @@
     self.rev = rev
     self.pool = pool

- db_path = os.path.join(repos_dir, 'db')
- if not os.path.exists(db_path):
+ db_path = svn.repos.svn_repos_find_root_path(repos_dir, pool)
+ if not db_path:
       db_path = repos_dir

- self.fs_ptr = svn.fs.new(None, pool)
- svn.fs.open_berkeley(self.fs_ptr, db_path)
-
+ self.fs_ptr = svn.repos.svn_repos_fs(svn.repos.svn_repos_open(db_path, pool))
+
     self.roots = { }

     self.root_this = self.get_root(rev)

-- 
Arkadiusz Mi¶kiewicz     CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 24 16:32:31 2004

This is an archived mail posted to the Subversion Dev mailing list.