subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1678718 - in /subversion/trunk/subversion/libsvn_fs_fs: cached_data.c lock.c recovery.c transaction.c
Date Mon, 11 May 2015 10:42:34 GMT
Author: rhuijben
Date: Mon May 11 10:42:33 2015
New Revision: 1678718

URL: http://svn.apache.org/r1678718
Log:
In fsfs: compose some possible errors in cases where we return an error
anyway, instead of just clearing errors for the recovery code path.

* subversion/libsvn_fs_fs/cached_data.c
  (svn_fs_fs__get_proplist): Compose errors.

* subversion/libsvn_fs_fs/lock.c
  (write_digest_file): Compose errors.

* subversion/libsvn_fs_fs/recovery.c
  (recover_find_max_ids): Compose errors.

* subversion/libsvn_fs_fs/transaction.c
  (get_txn_proplist): Compose errors.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
    subversion/trunk/subversion/libsvn_fs_fs/lock.c
    subversion/trunk/subversion/libsvn_fs_fs/recovery.c
    subversion/trunk/subversion/libsvn_fs_fs/transaction.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/cached_data.c?rev=1678718&r1=1678717&r2=1678718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/cached_data.c Mon May 11 10:42:33 2015
@@ -2735,7 +2735,7 @@ svn_fs_fs__get_proplist(apr_hash_t **pro
         {
           svn_string_t *id_str = svn_fs_fs__id_unparse(noderev->id, pool);
 
-          svn_error_clear(svn_stream_close(stream));
+          err = svn_error_compose_create(err, svn_stream_close(stream));
           return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
                    _("malformed property list for node-revision '%s' in '%s'"),
                    id_str->data, filename);
@@ -2767,8 +2767,8 @@ svn_fs_fs__get_proplist(apr_hash_t **pro
       if (err)
         {
           svn_string_t *id_str = svn_fs_fs__id_unparse(noderev->id, pool);
-          
-          svn_error_clear(svn_stream_close(stream));
+
+          err = svn_error_compose_create(err, svn_stream_close(stream));
           return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
                    _("malformed property list for node-revision '%s'"),
                    id_str->data);

Modified: subversion/trunk/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/lock.c?rev=1678718&r1=1678717&r2=1678718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/lock.c Mon May 11 10:42:33 2015
@@ -222,7 +222,7 @@ write_digest_file(apr_hash_t *children,
                                  svn_io_file_del_none, pool, pool));
   if ((err = svn_hash_write2(hash, stream, SVN_HASH_TERMINATOR, pool)))
     {
-      svn_error_clear(svn_stream_close(stream));
+      err = svn_error_compose_create(err, svn_stream_close(stream));
       return svn_error_createf(err->apr_err,
                                err,
                                _("Cannot write lock/entries hashfile '%s'"),
@@ -273,7 +273,7 @@ read_digest_file(apr_hash_t **children_p
   hash = apr_hash_make(pool);
   if ((err = svn_hash_read2(hash, stream, SVN_HASH_TERMINATOR, pool)))
     {
-      svn_error_clear(svn_stream_close(stream));
+      err = svn_error_compose_create(err, svn_stream_close(stream));
       return svn_error_createf(err->apr_err,
                                err,
                                _("Can't parse lock/entries hashfile '%s'"),

Modified: subversion/trunk/subversion/libsvn_fs_fs/recovery.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/recovery.c?rev=1678718&r1=1678717&r2=1678718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/recovery.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/recovery.c Mon May 11 10:42:33 2015
@@ -209,7 +209,7 @@ recover_find_max_ids(svn_fs_t *fs,
     {
       svn_string_t *id_str = svn_fs_fs__id_unparse(noderev->id, pool);
 
-      svn_error_clear(svn_stream_close(stream));
+      err = svn_error_compose_create(err, svn_stream_close(stream));
       return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
                 _("malformed representation for node-revision '%s'"),
                 id_str->data);

Modified: subversion/trunk/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/transaction.c?rev=1678718&r1=1678717&r2=1678718&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/transaction.c Mon May 11 10:42:33 2015
@@ -1145,7 +1145,7 @@ get_txn_proplist(apr_hash_t *proplist,
   err = svn_hash_read2(proplist, stream, SVN_HASH_TERMINATOR, pool);
   if (err)
     {
-      svn_error_clear(svn_stream_close(stream));  
+      err = svn_error_compose_create(err, svn_stream_close(stream));
       return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
                _("malformed transaction property list in '%s'"),
                path_txn_props(fs, txn_id, pool));



Mime
View raw message