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 2014/12/16 08:08:11 UTC

svn commit: r1645862 - in /subversion/branches/fsx-id/subversion/libsvn_fs_x: dag.c dag.h tree.c

Author: stefan2
Date: Tue Dec 16 07:08:10 2014
New Revision: 1645862

URL: http://svn.apache.org/r1645862
Log:
On the fsx-id branch:  Replace the old and now unused svn_fs_x__dag_get_id
with svn_fs_x__dag_get_noderev_id.

* subversion/libsvn_fs_x/dag.h
  (svn_fs_x__dag_get_id): Remove.
  (svn_fs_x__dag_get_noderev_id): Rename to svn_fs_x__dag_get_id.

* subversion/libsvn_fs_x/dag.c
  (svn_fs_x__dag_get_id): Remove.
  (svn_fs_x__dag_get_noderev_id): Rename to svn_fs_x__dag_get_id.
  (svn_fs_x__dag_check_mutable): Update caller.

* subversion/libsvn_fs_x/tree.c
  (x_node_relation,
  (x_change_node_prop,
  (merge,
   x_make_dir,
   x_delete_node,
   copy_helper,
   x_make_file,
   apply_textdelta,
   apply_text,
   stringify_node,
   verify_node): Update caller.

Modified:
    subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c
    subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.h
    subversion/branches/fsx-id/subversion/libsvn_fs_x/tree.c

Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c?rev=1645862&r1=1645861&r2=1645862&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c Tue Dec 16 07:08:10 2014
@@ -86,20 +86,6 @@ svn_node_kind_t svn_fs_x__dag_node_kind(
   return node->kind;
 }
 
-const svn_fs_id_t *
-svn_fs_x__dag_get_id(dag_node_t *node)
-{
-  const svn_fs_id_t *id;
-  svn_error_t *err = svn_fs_x__dag_get_fs_id(&id, node, node->node_pool);
-  if (err)
-    {
-      svn_error_clear(err);
-      SVN_ERR_MALFUNCTION_NO_RETURN();
-    }
-
-  return id;
-}
-
 /* Return the node revision ID of NODE.  The value returned is shared
    with NODE, and will be deallocated when NODE is.  */
 svn_error_t *
@@ -130,7 +116,7 @@ svn_fs_x__dag_get_copy_id(svn_fs_x__id_p
 
 
 const svn_fs_x__noderev_id_t *
-svn_fs_x__dag_get_noderev_id(const dag_node_t *node)
+svn_fs_x__dag_get_id(const dag_node_t *node)
 {
   return &node->id;
 }
@@ -247,7 +233,7 @@ svn_fs_x__dag_related_node(svn_boolean_t
 
 svn_boolean_t svn_fs_x__dag_check_mutable(const dag_node_t *node)
 {
-  return svn_fs_x__is_txn(svn_fs_x__dag_get_noderev_id(node)->change_set);
+  return svn_fs_x__is_txn(svn_fs_x__dag_get_id(node)->change_set);
 }
 
 

Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.h?rev=1645862&r1=1645861&r2=1645862&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.h (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.h Tue Dec 16 07:08:10 2014
@@ -111,12 +111,8 @@ svn_revnum_t svn_fs_x__dag_get_revision(
 
 /* Return the node revision ID of NODE.  The value returned is shared
    with NODE, and will be deallocated when NODE is.  */
-const svn_fs_id_t *svn_fs_x__dag_get_id(dag_node_t *node);
-
-/* Return the node revision ID of NODE.  The value returned is shared
-   with NODE, and will be deallocated when NODE is.  */
 const svn_fs_x__noderev_id_t *
-svn_fs_x__dag_get_noderev_id(const dag_node_t *node);
+svn_fs_x__dag_get_id(const dag_node_t *node);
 
 /* Return the node ID of NODE.  The value returned is shared with NODE,
    and will be deallocated when NODE is.  */

Modified: subversion/branches/fsx-id/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-id/subversion/libsvn_fs_x/tree.c?rev=1645862&r1=1645861&r2=1645862&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/tree.c Tue Dec 16 07:08:10 2014
@@ -1470,11 +1470,11 @@ x_node_relation(svn_fs_node_relation_t *
   /* We checked for all separations between ID spaces (repos, txn).
    * Now, we can simply test for the ID values themselves. */
   SVN_ERR(get_dag(&node, root_a, path_a, FALSE, pool));
-  noderev_id_a = *svn_fs_x__dag_get_noderev_id(node);
+  noderev_id_a = *svn_fs_x__dag_get_id(node);
   SVN_ERR(svn_fs_x__dag_get_node_id(&node_id_a, node));
 
   SVN_ERR(get_dag(&node, root_b, path_b, FALSE, pool));
-  noderev_id_b = *svn_fs_x__dag_get_noderev_id(node);
+  noderev_id_b = *svn_fs_x__dag_get_id(node);
   SVN_ERR(svn_fs_x__dag_get_node_id(&node_id_b, node));
 
   if (svn_fs_x__id_part_eq(&noderev_id_a, &noderev_id_b))
@@ -1691,7 +1691,7 @@ x_change_node_prop(svn_fs_root_t *root,
 
   /* Make a record of this modification in the changes table. */
   return add_change(root->fs, txn_id, path,
-                    svn_fs_x__dag_get_noderev_id(parent_path->node),
+                    svn_fs_x__dag_get_id(parent_path->node),
                     svn_fs_path_change_modify, FALSE, TRUE, mergeinfo_mod,
                     svn_fs_x__dag_node_kind(parent_path->node),
                     SVN_INVALID_REVNUM, NULL, pool);
@@ -1843,9 +1843,9 @@ merge(svn_stringbuf_t *conflict_p,
   /* We have the same fs, now check it. */
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
 
-  source_id   = svn_fs_x__dag_get_noderev_id(source);
-  target_id   = svn_fs_x__dag_get_noderev_id(target);
-  ancestor_id = svn_fs_x__dag_get_noderev_id(ancestor);
+  source_id   = svn_fs_x__dag_get_id(source);
+  target_id   = svn_fs_x__dag_get_id(target);
+  ancestor_id = svn_fs_x__dag_get_id(ancestor);
 
   /* It's improper to call this function with ancestor == target. */
   if (svn_fs_x__id_part_eq(ancestor_id, target_id))
@@ -2511,7 +2511,7 @@ x_make_dir(svn_fs_root_t *root,
                              sub_dir, pool));
 
   /* Make a record of this modification in the changes table. */
-  return add_change(root->fs, txn_id, path, svn_fs_x__dag_get_noderev_id(sub_dir),
+  return add_change(root->fs, txn_id, path, svn_fs_x__dag_get_id(sub_dir),
                     svn_fs_path_change_add, FALSE, FALSE, FALSE,
                     svn_node_dir, SVN_INVALID_REVNUM, NULL, pool);
 }
@@ -2568,7 +2568,7 @@ x_delete_node(svn_fs_root_t *root,
 
   /* Make a record of this modification in the changes table. */
   return add_change(root->fs, txn_id, path,
-                    svn_fs_x__dag_get_noderev_id(parent_path->node),
+                    svn_fs_x__dag_get_id(parent_path->node),
                     svn_fs_path_change_delete, FALSE, FALSE, FALSE, kind,
                     SVN_INVALID_REVNUM, NULL, pool);
 }
@@ -2643,8 +2643,8 @@ copy_helper(svn_fs_root_t *from_root,
      happening at all), just do nothing an return successfully,
      proud that you saved yourself from a tiresome task. */
   if (to_parent_path->node &&
-      svn_fs_x__id_part_eq(svn_fs_x__dag_get_noderev_id(from_node),
-                           svn_fs_x__dag_get_noderev_id(to_parent_path->node)))
+      svn_fs_x__id_part_eq(svn_fs_x__dag_get_id(from_node),
+                           svn_fs_x__dag_get_id(to_parent_path->node)))
     return SVN_NO_ERROR;
 
   if (! from_root->is_txn_root)
@@ -2699,7 +2699,7 @@ copy_helper(svn_fs_root_t *from_root,
       /* Make a record of this modification in the changes table. */
       SVN_ERR(get_dag(&new_node, to_root, to_path, TRUE, pool));
       SVN_ERR(add_change(to_root->fs, txn_id, to_path,
-                         svn_fs_x__dag_get_noderev_id(new_node), kind, FALSE,
+                         svn_fs_x__dag_get_id(new_node), kind, FALSE,
                          FALSE, FALSE, svn_fs_x__dag_node_kind(from_node),
                          from_root->rev, from_canonpath, pool));
     }
@@ -2828,7 +2828,7 @@ x_make_file(svn_fs_root_t *root,
                              pool));
 
   /* Make a record of this modification in the changes table. */
-  return add_change(root->fs, txn_id, path, svn_fs_x__dag_get_noderev_id(child),
+  return add_change(root->fs, txn_id, path, svn_fs_x__dag_get_id(child),
                     svn_fs_path_change_add, TRUE, FALSE, FALSE,
                     svn_node_file, SVN_INVALID_REVNUM, NULL, pool);
 }
@@ -3028,7 +3028,7 @@ apply_textdelta(void *baton, apr_pool_t
 
   /* Make a record of this modification in the changes table. */
   return add_change(tb->root->fs, txn_id, tb->path,
-                    svn_fs_x__dag_get_noderev_id(tb->node),
+                    svn_fs_x__dag_get_id(tb->node),
                     svn_fs_path_change_modify, TRUE, FALSE, FALSE,
                     svn_node_file, SVN_INVALID_REVNUM, NULL, pool);
 }
@@ -3163,7 +3163,7 @@ apply_text(void *baton, apr_pool_t *pool
 
   /* Make a record of this modification in the changes table. */
   return add_change(tb->root->fs, txn_id, tb->path,
-                    svn_fs_x__dag_get_noderev_id(tb->node),
+                    svn_fs_x__dag_get_id(tb->node),
                     svn_fs_path_change_modify, TRUE, FALSE, FALSE,
                     svn_node_file, SVN_INVALID_REVNUM, NULL, pool);
 }
@@ -4220,7 +4220,7 @@ stringify_node(dag_node_t *node,
                apr_pool_t *pool)
 {
   /* ### TODO: print some PATH@REV to it, too. */
-  return svn_fs_x__noderev_id_unparse(svn_fs_x__dag_get_noderev_id(node),
+  return svn_fs_x__noderev_id_unparse(svn_fs_x__dag_get_id(node),
                                       pool)->data;
 }
 
@@ -4247,8 +4247,8 @@ verify_node(dag_node_t *node,
   for (i = 0; i < parent_nodes->nelts; ++i)
     {
       dag_node_t *parent = APR_ARRAY_IDX(parent_nodes, i, dag_node_t *);
-      if (svn_fs_x__id_part_eq(svn_fs_x__dag_get_noderev_id(parent),
-                               svn_fs_x__dag_get_noderev_id(node)))
+      if (svn_fs_x__id_part_eq(svn_fs_x__dag_get_id(parent),
+                               svn_fs_x__dag_get_id(node)))
         return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                                 "Node is its own direct or indirect parent '%s'",
                                 stringify_node(node, iterpool));