subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1785738 - /subversion/trunk/subversion/libsvn_fs_fs/transaction.c
Date Mon, 06 Mar 2017 19:19:49 GMT
Author: stefan2
Date: Mon Mar  6 19:19:49 2017
New Revision: 1785738

URL: http://svn.apache.org/viewvc?rev=1785738&view=rev
Log:
More FSFS code preparation.

* subversion/libsvn_fs_fs/transaction.c
  (write_container_rep,
   write_container_delta_rep): Set all REP size information before looking
                               for a sharable rep.

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/transaction.c

Modified: subversion/trunk/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/transaction.c?rev=1785738&r1=1785737&r2=1785738&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/transaction.c Mon Mar  6 19:19:49 2017
@@ -2726,9 +2726,12 @@ write_container_rep(representation_t *re
   /* Store the results. */
   SVN_ERR(digests_final(rep, whb->md5_ctx, whb->sha1_ctx, scratch_pool));
 
+  /* Update size info. */
+  rep->expanded_size = whb->size;
+  rep->size = whb->size;
+
   /* Check and see if we already have a representation somewhere that's
      identical to the one we just wrote out. */
-  rep->expanded_size = whb->size;
   if (allow_rep_sharing)
     {
       representation_t *old_rep;
@@ -2769,9 +2772,6 @@ write_container_rep(representation_t *re
       SVN_ERR(store_p2l_index_entry(fs, &rep->txn_id, &entry, scratch_pool));
     }
 
-  /* update the representation */
-  rep->size = whb->size;
-
   return SVN_NO_ERROR;
 }
 
@@ -2877,9 +2877,13 @@ write_container_delta_rep(representation
   /* Store the results. */
   SVN_ERR(digests_final(rep, whb->md5_ctx, whb->sha1_ctx, scratch_pool));
 
+  /* Update size info. */
+  SVN_ERR(svn_io_file_get_offset(&rep_end, file, scratch_pool));
+  rep->size = rep_end - delta_start;
+  rep->expanded_size = whb->size;
+
   /* Check and see if we already have a representation somewhere that's
      identical to the one we just wrote out. */
-  rep->expanded_size = whb->size;
   if (allow_rep_sharing)
     {
       representation_t *old_rep;
@@ -2898,7 +2902,6 @@ write_container_delta_rep(representation
     }
 
   /* Write out our cosmetic end marker. */
-  SVN_ERR(svn_io_file_get_offset(&rep_end, file, scratch_pool));
   SVN_ERR(svn_stream_puts(file_stream, "ENDREP\n"));
 
   SVN_ERR(allocate_item_index(&rep->item_index, fs, &rep->txn_id,
@@ -2921,9 +2924,6 @@ write_container_delta_rep(representation
       SVN_ERR(store_p2l_index_entry(fs, &rep->txn_id, &entry, scratch_pool));
     }
 
-  /* update the representation */
-  rep->size = rep_end - delta_start;
-
   return SVN_NO_ERROR;
 }
 



Mime
View raw message