Author: philip
Date: Tue Jul 31 16:46:59 2012
New Revision: 1367674
URL: http://svn.apache.org/viewvc?rev=1367674&view=rev
Log:
Fix issue 4214, "svnadmin recover" should not create rep-cache.db.
* subversion/libsvn_fs_fs/fs_fs.c (recover_body): Don't create rep-cache.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1367674&r1=1367673&r2=1367674&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Tue Jul 31 16:46:59 2012
@@ -8610,9 +8610,17 @@ recover_body(void *baton, apr_pool_t *po
max_rev);
}
- /* Prune younger-than-(newfound-youngest) revisions from the rep cache. */
- if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
- SVN_ERR(svn_fs_fs__del_rep_reference(fs, max_rev, pool));
+ /* Prune younger-than-(newfound-youngest) revisions from the rep
+ cache if sharing is enabled taking care not to create the cache
+ if it does not exist. */
+ if (ffd->rep_sharing_allowed)
+ {
+ svn_boolean_t rep_cache_exists;
+
+ SVN_ERR(svn_fs_fs__exists_rep_cache(&rep_cache_exists, fs, pool));
+ if (rep_cache_exists)
+ SVN_ERR(svn_fs_fs__del_rep_reference(fs, max_rev, pool));
+ }
/* Now store the discovered youngest revision, and the next IDs if
relevant, in a new 'current' file. */