You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/12/21 18:03:26 UTC
svn commit: r1051559 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Author: danielsh
Date: Tue Dec 21 17:03:25 2010
New Revision: 1051559
URL: http://svn.apache.org/viewvc?rev=1051559&view=rev
Log:
* subversion/libsvn_fs_fs/fs_fs.c
(rep_write_contents_close):
On failure to open the rep-cache DB, log a warning but do not treat
that as a fatal error.
Caveat: the FS warning function defaults to a function that crashes the
process, so any FS API consumers that don't set that function will experience
a regression --- what used to be a 'normal' error now becomes an abort().
The FS API consumers in the core do set the FS warning function explicitly.
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=1051559&r1=1051558&r2=1051559&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Tue Dec 21 17:03:25 2010
@@ -5426,9 +5426,20 @@ rep_write_contents_close(void *baton)
/* Check and see if we already have a representation somewhere that's
identical to the one we just wrote out. */
if (ffd->rep_sharing_allowed)
- /* ### TODO: ignore errors opening the DB (issue #3506) * */
- SVN_ERR(svn_fs_fs__get_rep_reference(&old_rep, b->fs, rep->sha1_checksum,
- b->parent_pool));
+ {
+ svn_error_t *err;
+ err = svn_fs_fs__get_rep_reference(&old_rep, b->fs, rep->sha1_checksum,
+ b->parent_pool);
+ if (err)
+ {
+ /* Something's wrong with the rep-sharing index. We can continue
+ without rep-sharing, but warn.
+ */
+ (b->fs->warning)(b->fs->warning_baton, err);
+ svn_error_clear(err);
+ old_rep = NULL;
+ }
+ }
else
old_rep = NULL;