subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1228571 - /subversion/trunk/subversion/libsvn_repos/dump.c
Date Sat, 07 Jan 2012 06:17:07 GMT
Author: hwright
Date: Sat Jan  7 06:17:07 2012
New Revision: 1228571

URL: http://svn.apache.org/viewvc?rev=1228571&view=rev
Log:
Ev2 shims: Fill in a couple remaining background fetch functions needed when
doing a dump.

Current number of Ev2 test failures: 292

* subversion/libsvn_repos/dump.c
  (fetch_props_func, fetch_kind_func): New.
  (get_dump_editor): Use the new functions.

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

Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1228571&r1=1228570&r2=1228571&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Sat Jan  7 06:17:07 2012
@@ -852,6 +852,44 @@ change_dir_prop(void *parent_baton,
 }
 
 static svn_error_t *
+fetch_props_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_error_t *err;
+
+  err = svn_fs_node_proplist(props, eb->fs_root, path, result_pool);
+  if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND)
+    {
+      svn_error_clear(err);
+      *props = apr_hash_make(result_pool);
+      return SVN_NO_ERROR;
+    }
+  else if (err)
+    return svn_error_trace(err);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
+fetch_kind_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->fs_root, path, scratch_pool));
+  *kind = svn__kind_from_node_kind(node_kind, FALSE);
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 fetch_base_func(const char **filename,
                 void *baton,
                 const char *path,
@@ -935,6 +973,10 @@ get_dump_editor(const svn_delta_editor_t
   *edit_baton = eb;
   *editor = dump_editor;
 
+  shim_callbacks->fetch_kind_func = fetch_kind_func;
+  shim_callbacks->fetch_kind_baton = eb;
+  shim_callbacks->fetch_props_func = fetch_props_func;
+  shim_callbacks->fetch_props_baton = eb;
   shim_callbacks->fetch_base_func = fetch_base_func;
   shim_callbacks->fetch_base_baton = eb;
 



Mime
View raw message