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:23:03 UTC

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

Author: hwright
Date: Fri Oct 28 01:23:02 2011
New Revision: 1190115

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

* subversion/libsvn_repos/commit.c
  (prop_fetch_func): New.
  (svn_repos_get_commit_editor5): Provide the props fetch func to the shim.

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=1190115&r1=1190114&r2=1190115&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/commit.c (original)
+++ subversion/trunk/subversion/libsvn_repos/commit.c Fri Oct 28 01:23:02 2011
@@ -782,6 +782,25 @@ abort_edit(void *edit_baton,
 }
 
 
+static svn_error_t *
+prop_fetch_func(apr_hash_t **props,
+                void *baton,
+                const char *path,
+                apr_pool_t *result_pool,
+                apr_pool_t *scratch_pool)
+{
+  struct edit_baton *eb = baton;
+  svn_fs_root_t *fs_root;
+
+  SVN_ERR(svn_fs_revision_root(&fs_root, eb->fs,
+                               svn_fs_txn_base_revision(eb->txn),
+                               scratch_pool));
+  SVN_ERR(svn_fs_node_proplist(props, fs_root, path, result_pool));
+
+  return SVN_NO_ERROR;
+}
+
+
 
 /*** Public interfaces. ***/
 
@@ -855,6 +874,9 @@ svn_repos_get_commit_editor5(const svn_d
   *edit_baton = eb;
   *editor = e;
 
+  shim_callbacks->fetch_props_func = prop_fetch_func;
+  shim_callbacks->fetch_props_baton = eb;
+
   SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
                                    shim_callbacks, pool, pool));