You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/16 17:49:59 UTC

svn commit: r1652456 - /subversion/trunk/subversion/libsvn_fs_x/transaction.c

Author: stefan2
Date: Fri Jan 16 16:49:59 2015
New Revision: 1652456

URL: http://svn.apache.org/r1652456
Log:
Key / ID processing in FSX is much simpler these days. They are no longer
strings that need to be allocated.

* subversion/libsvn_fs_x/transaction.c
  (get_and_increment_txn_key_baton): Drop unnecessary result POOL member.
  (get_and_increment_txn_key_body): Use the SCRATCH_POOL provided for
                                    temporary objects.
  (create_txn_dir): Update struct initialization.

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

Modified: subversion/trunk/subversion/libsvn_fs_x/transaction.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/transaction.c?rev=1652456&r1=1652455&r2=1652456&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/transaction.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/transaction.c Fri Jan 16 16:49:59 2015
@@ -1171,7 +1171,6 @@ create_new_txn_noderev_from_rev(svn_fs_t
 struct get_and_increment_txn_key_baton {
   svn_fs_t *fs;
   apr_uint64_t txn_number;
-  apr_pool_t *pool;
 };
 
 /* Callback used in the implementation of create_txn_dir().  This gets
@@ -1188,7 +1187,7 @@ get_and_increment_txn_key_body(void *bat
   char new_id_str[SVN_INT64_BUFFER_SIZE];
 
   svn_stringbuf_t *buf;
-  SVN_ERR(svn_fs_x__read_content(&buf, txn_current_filename, cb->pool));
+  SVN_ERR(svn_fs_x__read_content(&buf, txn_current_filename, scratch_pool));
 
   /* remove trailing newlines */
   cb->txn_number = svn__base36toui64(NULL, buf->data);
@@ -1223,7 +1222,6 @@ create_txn_dir(const char **id_p,
      number, from the txn-current file, and write an
      incremented value back out to the file.  Place the revision
      number the transaction is based off into the transaction id. */
-  cb.pool = pool;
   cb.fs = fs;
   SVN_ERR(svn_fs_x__with_txn_current_lock(fs,
                                           get_and_increment_txn_key_body,