subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1623381 - /subversion/trunk/subversion/libsvn_fs_fs/recovery.c
Date Mon, 08 Sep 2014 12:49:42 GMT
Author: stefan2
Date: Mon Sep  8 12:49:42 2014
New Revision: 1623381

Make 'svnadmnin recover' bump the repository instance ID because the
admin might have copied the repo before attempting to recover it.

Under normal circumstances we would tell the admin to either use
hotcopy or to run 'svnadmin setuuid' on it.  The first might not
work on a corrupted repo while the second would invalidate working
copies even if the corruption did not affect the revision contents.
So, be nice to that stressed person and bump the instance ID.

* subversion/libsvn_fs_fs/recovery.c
  (recover_body): Bump instance ID before doing anything else.


Modified: subversion/trunk/subversion/libsvn_fs_fs/recovery.c
--- subversion/trunk/subversion/libsvn_fs_fs/recovery.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/recovery.c Mon Sep  8 12:49:42 2014
@@ -348,6 +348,11 @@ recover_body(void *baton, apr_pool_t *po
   /* Lose potentially corrupted data in temp files */
+  /* The admin may have created a plain copy of this repo before attempting
+     to recover it (hotcopy may or may not work with corrupted repos).
+     Bump the instance ID. */
+  SVN_ERR(svn_fs_fs__set_uuid(fs, fs->uuid, NULL, pool));
   /* We need to know the largest revision in the filesystem. */
   SVN_ERR(recover_get_largest_revision(fs, &max_rev, pool));

View raw message