You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/10/28 03:36:59 UTC

svn commit: r1190121 - /subversion/trunk/subversion/libsvn_repos/commit.c

Author: hwright
Date: Fri Oct 28 01:36:58 2011
New Revision: 1190121

URL: http://svn.apache.org/viewvc?rev=1190121&view=rev
Log:
Add a fetch kind function for Ev2 shims in the repos commit editor.

* subversion/libsvn_repos/commit.c
  (kind_fetch_func): New.
  (svn_repos_get_commit_editor5): Populate the shim callbacks appropriately.

Modified:
    subversion/trunk/subversion/libsvn_repos/commit.c

Modified: subversion/trunk/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/commit.c?rev=1190121&r1=1190120&r2=1190121&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/commit.c (original)
+++ subversion/trunk/subversion/libsvn_repos/commit.c Fri Oct 28 01:36:58 2011
@@ -800,6 +800,21 @@ prop_fetch_func(apr_hash_t **props,
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+kind_fetch_func(svn_kind_t *kind,
+                void *baton,
+                const char *path,
+                apr_pool_t *scratch_pool)
+{
+  struct edit_baton *eb = baton;
+  svn_node_kind_t node_kind;
+
+  SVN_ERR(svn_fs_check_path(&node_kind, eb->txn_root, path, scratch_pool));
+  *kind = svn__kind_from_node_kind(node_kind, FALSE);
+
+  return SVN_NO_ERROR;
+} 
+
 
 
 /*** Public interfaces. ***/
@@ -876,6 +891,8 @@ svn_repos_get_commit_editor5(const svn_d
 
   shim_callbacks->fetch_props_func = prop_fetch_func;
   shim_callbacks->fetch_props_baton = eb;
+  shim_callbacks->fetch_kind_func = kind_fetch_func;
+  shim_callbacks->fetch_kind_baton = eb;
 
   SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
                                    shim_callbacks, pool, pool));