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

[PATCH] svn_fs__dag_txn_root

From: Yoshiki Hayashi <yoshiki_at_xemacs.org>
Date: 2001-02-26 10:40:10 CET

Implementing this function was easy. It's almost same as
svn_fs__dag_revision_root.

* dag.c (svn_fs__dag_txn_root): New function.

Index: subversion/libsvn_fs/dag.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_fs/dag.c,v
retrieving revision 1.40
diff -u -r1.40 dag.c
--- subversion/libsvn_fs/dag.c 2001/02/24 22:39:11 1.40
+++ subversion/libsvn_fs/dag.c 2001/02/26 08:58:30
@@ -246,7 +246,7 @@
   /* The property list is the 2nd item in the header skel. */
   skel_t *props = header->children->next;
 
- /* Return a copy dup'd in TRAIL's pool, to fufill this routine's
+ /* Return a copy dup'd in TRAIL's pool, to fulfill this routine's
      promise about lifetimes. This is instead of doing fancier
      cache-y things. */
   *proplist_p = svn_fs__copy_skel (props, trail->pool);
@@ -346,6 +346,29 @@
   return SVN_NO_ERROR;
 }
 
+
+svn_error_t *
+svn_fs__dag_txn_root (dag_node_t **node_p,
+ svn_fs_t *fs,
+ const char *txn,
+ trail_t *trail)
+{
+ svn_fs_id_t *root_id, *ignored;
+ skel_t *root_contents;
+ dag_node_t *root_node;
+
+ SVN_ERR (svn_fs__get_txn (&root_id, &ignored, fs, txn, trail));
+ SVN_ERR (svn_fs__get_node_revision (&root_contents, fs, root_id, trail));
+
+ root_node = apr_pcalloc (trail->pool, sizeof (*root_node));
+ root_node->fs = fs;
+ root_node->id = root_id;
+ root_node->contents = root_contents;
+ root_node->pool = trail->pool;
+
+ *node_p = root_node;
+ return SVN_NO_ERROR;
+}
 
 
 svn_error_t *

-- 
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.