You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2012/03/24 18:05:39 UTC

svn commit: r1304861 - in /subversion/branches/node_pool/subversion/libsvn_fs_fs: dag.c dag.h tree.c

Author: danielsh
Date: Sat Mar 24 17:05:39 2012
New Revision: 1304861

URL: http://svn.apache.org/viewvc?rev=1304861&view=rev
Log:
Eliminate the DAG API's NODE_POOL, step 3.4.

Remove NODE_POOL parameters from get_node_revision()'s callers, through
the end of dag.c.

* subversion/libsvn_fs_fs/dag.h
* subversion/libsvn_fs_fs/dag.c
  (svn_fs_fs__dag_things_different, svn_fs_fs__dag_get_copyroot,
   svn_fs_fs__dag_get_copyfrom_rev, svn_fs_fs__dag_get_copyfrom_path):
     Remove POOL parameters.
  (svn_fs_fs__dag_get_edit_stream, svn_fs_fs__dag_copy):
     Stop documenting that POOL needs to live as long as one of the dag_node_t
     parameters.

* subversion/libsvn_fs_fs/tree.c
  (*): Update callers.

Modified:
    subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c
    subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h
    subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c

Modified: subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c?rev=1304861&r1=1304860&r2=1304861&view=diff
==============================================================================
--- subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c (original)
+++ subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.c Sat Mar 24 17:05:39 2012
@@ -1223,8 +1223,7 @@ svn_error_t *
 svn_fs_fs__dag_things_different(svn_boolean_t *props_changed,
                                 svn_boolean_t *contents_changed,
                                 dag_node_t *node1,
-                                dag_node_t *node2,
-                                apr_pool_t *pool)
+                                dag_node_t *node2)
 {
   node_revision_t *noderev1, *noderev2;
 
@@ -1254,8 +1253,7 @@ svn_fs_fs__dag_things_different(svn_bool
 svn_error_t *
 svn_fs_fs__dag_get_copyroot(svn_revnum_t *rev,
                             const char **path,
-                            dag_node_t *node,
-                            apr_pool_t *pool)
+                            dag_node_t *node)
 {
   node_revision_t *noderev;
 
@@ -1270,8 +1268,7 @@ svn_fs_fs__dag_get_copyroot(svn_revnum_t
 
 svn_error_t *
 svn_fs_fs__dag_get_copyfrom_rev(svn_revnum_t *rev,
-                                dag_node_t *node,
-                                apr_pool_t *pool)
+                                dag_node_t *node)
 {
   node_revision_t *noderev;
 
@@ -1285,8 +1282,7 @@ svn_fs_fs__dag_get_copyfrom_rev(svn_revn
 
 svn_error_t *
 svn_fs_fs__dag_get_copyfrom_path(const char **path,
-                                 dag_node_t *node,
-                                 apr_pool_t *pool)
+                                 dag_node_t *node)
 {
   node_revision_t *noderev;
 

Modified: subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h?rev=1304861&r1=1304860&r2=1304861&view=diff
==============================================================================
--- subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h (original)
+++ subversion/branches/node_pool/subversion/libsvn_fs_fs/dag.h Sat Mar 24 17:05:39 2012
@@ -423,8 +423,7 @@ svn_fs_fs__dag_get_file_delta_stream(svn
    Any previous edits on the file will be deleted, and a new edit
    stream will be constructed.
 
-   Use POOL for all allocations, including to cache the node_revision in
-   FILE.
+   Use POOL for all allocations.
  */
 svn_error_t *svn_fs_fs__dag_get_edit_stream(svn_stream_t **contents,
                                             dag_node_t *file,
@@ -503,8 +502,7 @@ svn_error_t *svn_fs_fs__dag_make_file(da
 
    If PRESERVE_HISTORY is false, FROM_PATH and FROM_REV are ignored.
 
-   Use POOL for all allocations, including to cache the node_revision in
-   FROM_NODE.
+   Use POOL for all allocations.
  */
 svn_error_t *svn_fs_fs__dag_copy(dag_node_t *to_node,
                                  const char *entry,
@@ -534,39 +532,29 @@ svn_error_t *svn_fs_fs__dag_copy(dag_nod
    may leave us with a slight chance of a false positive, though I
    don't really see how that would happen in practice.  Nevertheless,
    it should probably be fixed.
-
-   Use POOL for all allocations, including to cache the node_revision in NODE1
-   and NODE2.
  */
 svn_error_t *svn_fs_fs__dag_things_different(svn_boolean_t *props_changed,
                                              svn_boolean_t *contents_changed,
                                              dag_node_t *node1,
-                                             dag_node_t *node2,
-                                             apr_pool_t *pool);
+                                             dag_node_t *node2);
 
 
 /* Set *REV and *PATH to the copyroot revision and path of node NODE, or
    to SVN_INVALID_REVNUM and NULL if no copyroot exists.
-   Use POOL for all allocations, including to cache the node_revision in NODE.
  */
 svn_error_t *svn_fs_fs__dag_get_copyroot(svn_revnum_t *rev,
                                          const char **path,
-                                         dag_node_t *node,
-                                         apr_pool_t *pool);
+                                         dag_node_t *node);
 
 /* Set *REV to the copyfrom revision associated with NODE.
-   Use POOL for all allocations, including to cache the node_revision in NODE.
  */
 svn_error_t *svn_fs_fs__dag_get_copyfrom_rev(svn_revnum_t *rev,
-                                             dag_node_t *node,
-                                             apr_pool_t *pool);
+                                             dag_node_t *node);
 
 /* Set *PATH to the copyfrom path associated with NODE.
-   Use POOL for all allocations, including to cache the node_revision in NODE.
  */
 svn_error_t *svn_fs_fs__dag_get_copyfrom_path(const char **path,
-                                              dag_node_t *node,
-                                              apr_pool_t *pool);
+                                              dag_node_t *node);
 
 /* Update *TARGET so that SOURCE is it's predecessor.
  */

Modified: subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c?rev=1304861&r1=1304860&r2=1304861&view=diff
==============================================================================
--- subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/node_pool/subversion/libsvn_fs_fs/tree.c Sat Mar 24 17:05:39 2012
@@ -502,7 +502,7 @@ get_copy_inheritance(copy_id_inherit_t *
      or if it is a branch point that we are accessing via its original
      copy destination path. */
   SVN_ERR(svn_fs_fs__dag_get_copyroot(&copyroot_rev, &copyroot_path,
-                                      child->node,pool));
+                                      child->node));
   SVN_ERR(svn_fs_fs__revision_root(&copyroot_root, fs, copyroot_rev, pool));
   SVN_ERR(get_dag(&copyroot_node, copyroot_root, copyroot_path, pool));
   copyroot_id = svn_fs_fs__dag_get_id(copyroot_node);
@@ -763,7 +763,7 @@ make_path_mutable(svn_fs_root_t *root,
 
       /* Determine what copyroot our new child node should use. */
       SVN_ERR(svn_fs_fs__dag_get_copyroot(&copyroot_rev, &copyroot_path,
-                                          parent_path->node, pool));
+                                          parent_path->node));
       SVN_ERR(svn_fs_fs__revision_root(&copyroot_root, root->fs,
                                        copyroot_rev, pool));
       SVN_ERR(get_dag(&copyroot_node, copyroot_root, copyroot_path, pool));
@@ -1126,7 +1126,7 @@ fs_props_changed(svn_boolean_t *changed_
   SVN_ERR(get_dag(&node1, root1, path1, pool));
   SVN_ERR(get_dag(&node2, root2, path2, pool));
   return svn_fs_fs__dag_things_different(changed_p, NULL,
-                                         node1, node2, pool);
+                                         node1, node2);
 }
 
 
@@ -2143,8 +2143,8 @@ fs_copied_from(svn_revnum_t *rev_p,
       /* There is no cached entry, look it up the old-fashioned
          way. */
       SVN_ERR(get_dag(&node, root, path, pool));
-      SVN_ERR(svn_fs_fs__dag_get_copyfrom_rev(&copyfrom_rev, node, pool));
-      SVN_ERR(svn_fs_fs__dag_get_copyfrom_path(&copyfrom_path, node, pool));
+      SVN_ERR(svn_fs_fs__dag_get_copyfrom_rev(&copyfrom_rev, node));
+      SVN_ERR(svn_fs_fs__dag_get_copyfrom_path(&copyfrom_path, node));
     }
 
   *rev_p  = copyfrom_rev;
@@ -2654,7 +2654,7 @@ fs_contents_changed(svn_boolean_t *chang
   SVN_ERR(get_dag(&node1, root1, path1, pool));
   SVN_ERR(get_dag(&node2, root2, path2, pool));
   return svn_fs_fs__dag_things_different(NULL, changed_p,
-                                         node1, node2, pool);
+                                         node1, node2);
 }
 
 
@@ -2786,7 +2786,7 @@ find_youngest_copyroot(svn_revnum_t *rev
 
   /* Find our copyroot. */
   SVN_ERR(svn_fs_fs__dag_get_copyroot(&rev_mine, &path_mine,
-                                      parent_path->node, pool));
+                                      parent_path->node));
 
   /* If a parent and child were copied to in the same revision, prefer
      the child copy target, since it is the copy relevant to the
@@ -3177,8 +3177,8 @@ history_prev(void *baton, apr_pool_t *po
           /* If we get here, then our current path is the destination
              of, or the child of the destination of, a copy.  Fill
              in the return values and get outta here.  */
-          SVN_ERR(svn_fs_fs__dag_get_copyfrom_rev(&src_rev, node, pool));
-          SVN_ERR(svn_fs_fs__dag_get_copyfrom_path(&copy_src, node, pool));
+          SVN_ERR(svn_fs_fs__dag_get_copyfrom_rev(&src_rev, node));
+          SVN_ERR(svn_fs_fs__dag_get_copyfrom_path(&copy_src, node));
 
           dst_rev = copyroot_rev;
           src_path = svn_fspath__join(copy_src, remainder_path, pool);