subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1403311 - /subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
Date Mon, 29 Oct 2012 14:27:49 GMT
Author: philip
Date: Mon Oct 29 14:27:49 2012
New Revision: 1403311

URL: http://svn.apache.org/viewvc?rev=1403311&view=rev
Log:
Allow underlying reason for revprop cache failure to be reported.

* subversion/libsvn_fs_fs/fs_fs.c
  (log_revprop_cache_init_warning): Add error parameter.
  (has_revprop_cache): Pass underlying error.

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=1403311&r1=1403310&r2=1403311&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Mon Oct 29 14:27:49 2012
@@ -3213,10 +3213,12 @@ ensure_revprop_timeout(svn_fs_t *fs)
 /* Create an error object with the given MESSAGE and pass it to the
    WARNING member of FS. */
 static void
-log_revprop_cache_init_warning(svn_fs_t *fs, const char *message)
+log_revprop_cache_init_warning(svn_fs_t *fs,
+                               svn_error_t *underlying_err,
+                               const char *message)
 {
   svn_error_t *err = svn_error_createf(SVN_ERR_FS_REPPROP_CACHE_INIT_FAILURE,
-                                       NULL,
+                                       underlying_err,
                                        message, fs->path);
 
   if (fs->warning)
@@ -3244,8 +3246,9 @@ has_revprop_cache(svn_fs_t *fs, apr_pool
        * -> disable the revprop cache for good
        */
       ffd->revprop_cache = NULL;
-      log_revprop_cache_init_warning(fs, "Revprop caching for '%s' disabled"
-                                         " because it would be inefficient.");
+      log_revprop_cache_init_warning(fs, NULL,
+                                     "Revprop caching for '%s' disabled"
+                                     " because it would be inefficient.");
       
       return FALSE;
     }
@@ -3256,12 +3259,11 @@ has_revprop_cache(svn_fs_t *fs, apr_pool
     {
       /* failure -> disable revprop cache for good */
 
-      svn_error_clear(error);
       ffd->revprop_cache = NULL;
-      log_revprop_cache_init_warning(fs, "Revprop caching for '%s' disabled "
-                                         "because SHM "
-                                         "infrastructure for revprop "
-                                         "caching failed to initialize.");
+      log_revprop_cache_init_warning(fs, error,
+                                     "Revprop caching for '%s' disabled "
+                                     "because SHM infrastructure for revprop "
+                                     "caching failed to initialize.");
 
       return FALSE;
     }



Mime
View raw message