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

[PATCH] svn_fs_node_id

From: Yoshiki Hayashi <yoshiki_at_xemacs.org>
Date: 2001-03-01 08:06:44 CET

* tree.c (sturuct node_id_args): New struct.
* tree.c (txn_body_node_id): New helper function for svn_fs_node_id.
* tree.c (svn_fs_node_id): New function.

Index: tree.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_fs/tree.c,v
retrieving revision 1.24
diff -u -r1.24 tree.c
--- tree.c 2001/02/27 22:15:13 1.24
+++ tree.c 2001/03/01 06:36:52
@@ -533,6 +533,46 @@
 /* Generic node operations. */
 
 
+struct node_id_args {
+ svn_fs_id_t **id_p;
+ svn_fs_root_t *root;
+ const char *path;
+};
+
+
+static svn_error_t *
+txn_body_node_id (void *baton, trail_t *trail)
+{
+ struct node_id_args *args = baton;
+ parent_path_t *parent_path;
+
+ SVN_ERR (open_path (&parent_path, args->root, args->path, 0, trail));
+ *args->id_p = svn_fs_copy_id (svn_fs__dag_get_id (parent_path->node),
+ trail->pool);
+
+ return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_fs_node_id (svn_fs_id_t **id_p,
+ svn_fs_root_t *root,
+ const char *path,
+ apr_pool_t *pool)
+{
+ svn_fs_id_t *id;
+ struct node_id_args args;
+
+ args.id_p = &id;
+ args.root = root;
+ args.path = path;
+
+ SVN_ERR (svn_fs__retry_txn (root->fs, txn_body_node_id, &args, pool));
+ *id_p = id;
+ return SVN_NO_ERROR;
+}
+
+
 struct node_prop_args
 {
   svn_string_t **value_p;

-- 
Yoshiki Hayashi
Received on Sat Oct 21 14:36:23 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.