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/24 16:39:20 UTC
svn commit: r1647807 - in
/subversion/branches/fsx-id/subversion/libsvn_fs_x: dag.c dag.h
Author: stefan2
Date: Wed Dec 24 15:39:20 2014
New Revision: 1647807
URL: http://svn.apache.org/r1647807
Log:
On the fsx-id branch: Get rid of an unnecessary intermediary function.
* subversion/libsvn_fs_x/dag.h
(svn_fs_x__dag_remove_node): Remove declaration.
* subversion/libsvn_fs_x/dag.c
(svn_fs_x__dag_remove_node): Remove implementation.
(svn_fs_x__dag_delete_if_mutable): Call svn_fs_x__delete_node_revision
directly as we know the node is mutable.
Modified:
subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c
subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.h
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=1647807&r1=1647806&r2=1647807&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.c Wed Dec 24 15:39:20 2014
@@ -875,26 +875,6 @@ svn_fs_x__dag_delete(dag_node_t *parent,
svn_error_t *
-svn_fs_x__dag_remove_node(svn_fs_t *fs,
- const svn_fs_x__noderev_id_t *id,
- apr_pool_t *pool)
-{
- dag_node_t *node;
-
- /* Fetch the node. */
- SVN_ERR(svn_fs_x__dag_get_node(&node, fs, id, pool));
-
- /* If immutable, do nothing and return immediately. */
- if (! svn_fs_x__dag_check_mutable(node))
- return svn_error_createf(SVN_ERR_FS_NOT_MUTABLE, NULL,
- "Attempted removal of immutable node");
-
- /* Delete the node revision. */
- return svn_fs_x__delete_node_revision(fs, id, pool);
-}
-
-
-svn_error_t *
svn_fs_x__dag_delete_if_mutable(svn_fs_t *fs,
const svn_fs_x__noderev_id_t *id,
apr_pool_t *pool)
@@ -927,7 +907,7 @@ svn_fs_x__dag_delete_if_mutable(svn_fs_t
/* ... then delete the node itself, after deleting any mutable
representations and strings it points to. */
- return svn_fs_x__dag_remove_node(fs, id, pool);
+ return svn_fs_x__delete_node_revision(fs, id, pool);
}
svn_error_t *
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=1647807&r1=1647806&r2=1647807&view=diff
==============================================================================
--- subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.h (original)
+++ subversion/branches/fsx-id/subversion/libsvn_fs_x/dag.h Wed Dec 24 15:39:20 2014
@@ -378,20 +378,6 @@ svn_error_t *svn_fs_x__dag_delete(dag_no
apr_pool_t *pool);
-/* Delete the node revision assigned to node ID from FS's `nodes'
- table, allocating from POOL. Also delete any mutable
- representations and strings associated with that node revision. ID
- may refer to a file or directory, which must be mutable.
-
- NOTE: If ID represents a directory, and that directory has mutable
- children, you risk orphaning those children by leaving them
- dangling, disconnected from all DAG trees. It is assumed that
- callers of this interface know what in the world they are doing. */
-svn_error_t *svn_fs_x__dag_remove_node(svn_fs_t *fs,
- const svn_fs_x__noderev_id_t *id,
- apr_pool_t *pool);
-
-
/* Delete all mutable node revisions reachable from node ID, including
ID itself, from FS's `nodes' table, allocating from POOL. Also
delete any mutable representations and strings associated with that