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

Re: svn commit: r1213681 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 13 Dec 2011 16:20:20 +0200

On Tue, Dec 13, 2011, at 13:30, stsp_at_apache.org wrote:
> Author: stsp
> Date: Tue Dec 13 13:30:33 2011
> New Revision: 1213681
>
> URL: http://svn.apache.org/viewvc?rev=1213681&view=rev
> Log:
> * subversion/libsvn_fs_fs/fs_fs.c
> (recover_body): svn_fs_fs__del_rep_reference() will assert if rep-sharing
> is disabled. So don't call it in that case.
>
> 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=1213681&r1=1213680&r2=1213681&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> +++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Tue Dec 13 13:30:33 2011
> @@ -7054,7 +7054,8 @@ recover_body(void *baton, apr_pool_t *po
> }
>
> /* Prune younger-than-(newfound-youngest) revisions from the rep cache. */
> - SVN_ERR(svn_fs_fs__del_rep_reference(fs, max_rev, pool));
> + if (ffd->rep_sharing_allowed)
> + 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. */

Thanks for the fix.

How about running the DELETE code even if rep-sharing is only disabled in fsfs.conf:

[[[
Index: subversion/libsvn_fs_fs/fs_fs.c
===================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 1213698)
+++ subversion/libsvn_fs_fs/fs_fs.c (working copy)
@@ -7054,7 +7054,7 @@ recover_body(void *baton, apr_pool_t *pool)
     }
 
   /* Prune younger-than-(newfound-youngest) revisions from the rep cache. */
- if (ffd->rep_sharing_allowed)
+ if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
     SVN_ERR(svn_fs_fs__del_rep_reference(fs, max_rev, pool));
 
   /* Now store the discovered youngest revision, and the next IDs if
Index: subversion/libsvn_fs_fs/rep-cache.c
===================================================================
--- subversion/libsvn_fs_fs/rep-cache.c (revision 1213698)
+++ subversion/libsvn_fs_fs/rep-cache.c (working copy)
@@ -341,7 +341,7 @@ svn_fs_fs__del_rep_reference(svn_fs_t *fs,
   fs_fs_data_t *ffd = fs->fsap_data;
   svn_sqlite__stmt_t *stmt;
 
- SVN_ERR_ASSERT(ffd->rep_sharing_allowed);
+ SVN_ERR_ASSERT(ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT);
   if (! ffd->rep_cache_db)
     SVN_ERR(svn_fs_fs__open_rep_cache(fs, pool));
 
]]]

>
>
>
Received on 2011-12-13 15:20:54 CET

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.