[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/libsvn_fs dag.c dag.h

From: Jim Blandy <jimb_at_zwingli.cygnus.com>
Date: 2001-03-03 00:46:07 CET

Why does that function need to be public? This looks very wrong.

cmpilato@tigris.org writes:

>
> User: cmpilato
> Date: 01/03/02 12:32:36
>
> Modified: subversion/libsvn_fs dag.c dag.h
> Log:
> * libsvn_fs/dag.h
> * libsvn_fs/dag.c
>
> (svn_fs__dag_get_node): Renamed from create_node, and exposed to
> other FS module components outside of dag.c.
>
> Revision Changes Path
> 1.66 +22 -20 subversion/subversion/libsvn_fs/dag.c
>
> Index: dag.c
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_fs/dag.c,v
> retrieving revision 1.65
> retrieving revision 1.66
> diff -u -r1.65 -r1.66
> --- dag.c 2001/03/02 17:38:12 1.65
> +++ dag.c 2001/03/02 20:32:36 1.66
> @@ -235,14 +235,11 @@
> }
>
>
> -/* Constructor function for dag_node_t.
> - Create a new *NODE representing the node identified by ID in FS.
> - Allocate from TRAIL->pool, use TRAIL->pool for (*NODE)->pool. */
> -static svn_error_t *
> -create_node (dag_node_t **node,
> - svn_fs_t *fs,
> - svn_fs_id_t *id,
> - trail_t *trail)
> +svn_error_t *
> +svn_fs__dag_get_node (dag_node_t **node,
> + svn_fs_t *fs,
> + svn_fs_id_t *id,
> + trail_t *trail)
> {
> dag_node_t *new_node;
> skel_t *contents;
> @@ -535,7 +532,7 @@
> svn_fs_id_t *root_id;
>
> SVN_ERR (svn_fs__rev_get_root (&root_id, fs, rev, trail));
> - SVN_ERR (create_node (node_p, fs, root_id, trail));
> + SVN_ERR (svn_fs__dag_get_node (node_p, fs, root_id, trail));
>
> return SVN_NO_ERROR;
> }
> @@ -550,7 +547,7 @@
> svn_fs_id_t *root_id, *ignored;
>
> SVN_ERR (svn_fs__get_txn (&root_id, &ignored, fs, txn, trail));
> - SVN_ERR (create_node (node_p, fs, root_id, trail));
> + SVN_ERR (svn_fs__dag_get_node (node_p, fs, root_id, trail));
>
> return SVN_NO_ERROR;
> }
> @@ -663,8 +660,9 @@
> }
>
> /* Initialize the youngster. */
> - SVN_ERR (create_node (child_p, svn_fs__dag_get_fs (parent),
> - new_node_id, trail));
> + SVN_ERR (svn_fs__dag_get_node (child_p,
> + svn_fs__dag_get_fs (parent),
> + new_node_id, trail));
>
> return SVN_NO_ERROR;
> }
> @@ -712,7 +710,7 @@
> }
>
> /* One way or another, root_id now identifies a cloned root node. */
> - SVN_ERR (create_node (root_p, fs, root_id, trail));
> + SVN_ERR (svn_fs__dag_get_node (root_p, fs, root_id, trail));
>
> /*
> * (Sung to the tune of "Home, Home on the Range", with thanks to
> @@ -1018,8 +1016,9 @@
> }
>
> /* Create a new node_dag_t for our new node */
> - SVN_ERR (create_node (child_p, svn_fs__dag_get_fs (parent),
> - new_node_id, trail));
> + SVN_ERR (svn_fs__dag_get_node (child_p,
> + svn_fs__dag_get_fs (parent),
> + new_node_id, trail));
>
> /* We can safely call add_new_entry because we already know that
> PARENT is mutable, and we just created CHILD, so we know it has
> @@ -1288,8 +1287,9 @@
> trail->pool);
> }
>
> - SVN_ERR (create_node (child_p, svn_fs__dag_get_fs (parent),
> - node_id, trail));
> + SVN_ERR (svn_fs__dag_get_node (child_p,
> + svn_fs__dag_get_fs (parent),
> + node_id, trail));
>
> return SVN_NO_ERROR;
> }
> @@ -1451,13 +1451,15 @@
> far above. */
>
> /* Time to actually create our new node in the filesystem */
> - SVN_ERR (svn_fs__create_node (&new_node_id, parent->fs,
> + SVN_ERR (svn_fs__create_node (&new_node_id,
> + parent->fs,
> new_node_skel, trail));
> }
>
> /* Create a new node_dag_t for our new node */
> - SVN_ERR (create_node (child_p, svn_fs__dag_get_fs (parent),
> - new_node_id, trail));
> + SVN_ERR (svn_fs__dag_get_node (child_p,
> + svn_fs__dag_get_fs (parent),
> + new_node_id, trail));
>
> /* We can safely call add_new_entry because we already know that
> PARENT is mutable, and we just created CHILD, so we know it has
>
>
>
> 1.31 +9 -0 subversion/subversion/libsvn_fs/dag.h
>
> Index: dag.h
> ===================================================================
> RCS file: /cvs/subversion/subversion/libsvn_fs/dag.h,v
> retrieving revision 1.30
> retrieving revision 1.31
> diff -u -r1.30 -r1.31
> --- dag.h 2001/02/27 22:03:46 1.30
> +++ dag.h 2001/03/02 20:32:36 1.31
> @@ -58,6 +58,15 @@
> typedef struct dag_node_t dag_node_t;
>
>
> +/* Allocate (from TRAIL->pool) and return a new dag_node_t structure
> + *NODE, initialized with the values ID and FS, and setting
> + *NODE->pool to TRAIL->pool. */
> +svn_error_t *
> +svn_fs__dag_get_node (dag_node_t **node,
> + svn_fs_t *fs,
> + svn_fs_id_t *id,
> + trail_t *trail);
> +
> /* Return a new dag_node_t object referring to the same node as NODE,
> allocated in TRAIL->pool. If you're trying to build a structure in
> TRAIL->pool that wants to refer to dag nodes that may have been
>
>
>
>
Received on Sat Oct 21 14:36:25 2006

This is an archived mail posted to the Subversion Dev mailing list.