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/18 16:36:05 UTC

svn commit: r1652777 - in /subversion/trunk/subversion/libsvn_fs_x: dag.c dag.h

Author: stefan2
Date: Sun Jan 18 15:36:05 2015
New Revision: 1652777

URL: http://svn.apache.org/r1652777
Log:
Fix pool naming for the last FSX/DAG function that is not a caching callback.

* subversion/libsvn_fs_x/dag.c
  (svn_fs_x__dag_copy): We don't modify any of the incoming DAG nodes.
                        Therefore, the POOL is a mere SCRATCH_POOL.

* subversion/libsvn_fs_x/dag.h
  (svn_fs_x__dag_copy): Sync declaration with implementation.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/dag.c
    subversion/trunk/subversion/libsvn_fs_x/dag.h

Modified: subversion/trunk/subversion/libsvn_fs_x/dag.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/dag.c?rev=1652777&r1=1652776&r2=1652777&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/dag.c Sun Jan 18 15:36:05 2015
@@ -1247,7 +1247,7 @@ svn_fs_x__dag_copy(dag_node_t *to_node,
                    svn_revnum_t from_rev,
                    const char *from_path,
                    svn_fs_x__txn_id_t txn_id,
-                   apr_pool_t *pool)
+                   apr_pool_t *scratch_pool)
 {
   const svn_fs_x__id_t *id;
 
@@ -1259,10 +1259,10 @@ svn_fs_x__dag_copy(dag_node_t *to_node,
 
       /* Make a copy of the original node revision. */
       SVN_ERR(get_node_revision(&from_noderev, from_node));
-      to_noderev = copy_node_revision(from_noderev, pool);
+      to_noderev = copy_node_revision(from_noderev, scratch_pool);
 
       /* Reserve a copy ID for this new copy. */
-      SVN_ERR(svn_fs_x__reserve_copy_id(&copy_id, fs, txn_id, pool));
+      SVN_ERR(svn_fs_x__reserve_copy_id(&copy_id, fs, txn_id, scratch_pool));
 
       /* Create a successor with its predecessor pointing at the copy
          source. */
@@ -1270,15 +1270,15 @@ svn_fs_x__dag_copy(dag_node_t *to_node,
       to_noderev->predecessor_count++;
       to_noderev->created_path =
         svn_fspath__join(svn_fs_x__dag_get_created_path(to_node), entry,
-                         pool);
-      to_noderev->copyfrom_path = apr_pstrdup(pool, from_path);
+                         scratch_pool);
+      to_noderev->copyfrom_path = apr_pstrdup(scratch_pool, from_path);
       to_noderev->copyfrom_rev = from_rev;
 
       /* Set the copyroot equal to our own id. */
       to_noderev->copyroot_path = NULL;
 
       SVN_ERR(svn_fs_x__create_successor(fs, to_noderev,
-                                         &copy_id, txn_id, pool));
+                                         &copy_id, txn_id, scratch_pool));
       id = &to_noderev->noderev_id;
     }
   else  /* don't preserve history */
@@ -1288,7 +1288,7 @@ svn_fs_x__dag_copy(dag_node_t *to_node,
 
   /* Set the entry in to_node to the new id. */
   return svn_fs_x__dag_set_entry(to_node, entry, id, from_node->kind,
-                                 txn_id, pool);
+                                 txn_id, scratch_pool);
 }
 
 

Modified: subversion/trunk/subversion/libsvn_fs_x/dag.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/dag.h?rev=1652777&r1=1652776&r2=1652777&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/dag.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/dag.h Sun Jan 18 15:36:05 2015
@@ -521,9 +521,8 @@ svn_fs_x__dag_make_file(dag_node_t **chi
 
 /* Copies */
 
-/* Make ENTRY in TO_NODE be a copy of FROM_NODE, allocating from POOL.
-   TO_NODE must be mutable.  TXN_ID is the Subversion transaction
-   under which this occurs.
+/* Make ENTRY in TO_NODE be a copy of FROM_NODE.  TO_NODE must be mutable.
+   TXN_ID is the Subversion transaction under which this occurs.
 
    If PRESERVE_HISTORY is true, the new node will record that it was
    copied from FROM_PATH in FROM_REV; therefore, FROM_NODE should be
@@ -533,7 +532,7 @@ svn_fs_x__dag_make_file(dag_node_t **chi
 
    If PRESERVE_HISTORY is false, FROM_PATH and FROM_REV are ignored.
 
-   Use POOL for all allocations.
+   Use SCRATCH_POOL for temporary allocations.
  */
 svn_error_t *
 svn_fs_x__dag_copy(dag_node_t *to_node,
@@ -543,7 +542,7 @@ svn_fs_x__dag_copy(dag_node_t *to_node,
                    svn_revnum_t from_rev,
                    const char *from_path,
                    svn_fs_x__txn_id_t txn_id,
-                   apr_pool_t *pool);
+                   apr_pool_t *scratch_pool);
 
 
 /* Comparison */