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

Re: UpPgrading BDB repositories on Win32

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-05-06 01:01:04 CEST

Branko ÄŒibej <brane@xbc.nu> writes:

> So, it seems that the following procedure should work:
>
> --------
> -- Make sure nobody is using the repository (stop Apache/svnserve,
> restrict access via file://).
> -- For each repository, using the old (1.1.x) binaries:
> -- Run "svnadmin recover <repos-dir>";
> -- Create a backup of the repository;
> -- Run "svnadmin list-unused-dblogs <repos-dir>"
> and remove the listed files;
> -- Delete all the "<repos-dir>\db\__db.00?" files.
> -- Upgrade Subversion.
> --------

That works, but only if I back out my error printing patch. So it
leaves the problem that the remaining 4.2 log file will sometimes
cause BDB to call bdb_error_gatherer() and so generate svn_error_t
errors that never get cleared. I'm currently using the following to
clear and ignore such errors:

Index: subversion/libsvn_fs_base/bdb/bdb-err.c
===================================================================
--- subversion/libsvn_fs_base/bdb/bdb-err.c (revision 14573)
+++ subversion/libsvn_fs_base/bdb/bdb-err.c (working copy)
@@ -86,10 +86,14 @@
 svn_error_t *
 svn_fs_bdb__wrap_db (svn_fs_t *fs, const char *operation, int db_err)
 {
- base_fs_data_t *bfd;
+ base_fs_data_t *bfd = fs->fsap_data;
 
   if (! db_err)
- return SVN_NO_ERROR;
+ {
+ svn_error_clear (bfd->errcall_baton->pending_errors);
+ bfd->errcall_baton->pending_errors = NULL;
+ return SVN_NO_ERROR;
+ }
 
   bfd = fs->fsap_data;
   return svn_fs_bdb__dberrf
Index: subversion/libsvn_fs_base/bdb/bdb-err.h
===================================================================
--- subversion/libsvn_fs_base/bdb/bdb-err.h (revision 14573)
+++ subversion/libsvn_fs_base/bdb/bdb-err.h (working copy)
@@ -78,6 +78,8 @@
     int db_err__temp = (expr); \
     if (db_err__temp) \
       return svn_fs_bdb__dberr ((ec_baton), db_err__temp); \
+ svn_error_clear (ec_baton->pending_errors); \
+ ec_baton->pending_errors = NULL; \
   } while (0)
 
 

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 6 01:01:57 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.