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 2012/06/15 10:35:00 UTC
svn commit: r1350530 - /subversion/trunk/subversion/libsvn_repos/replay.c
Author: hwright
Date: Fri Jun 15 08:35:00 2012
New Revision: 1350530
URL: http://svn.apache.org/viewvc?rev=1350530&view=rev
Log:
Implement a fetch kind func for the replay Ev2 wrapper.
* subversion/libsvn_repos/replay.c
(fetch_kind_func): New.
(svn_repos_replay2): Use.
(replay_node): Relpath-ify the copyfrom path when doing a copy.
Modified:
subversion/trunk/subversion/libsvn_repos/replay.c
Modified: subversion/trunk/subversion/libsvn_repos/replay.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/replay.c?rev=1350530&r1=1350529&r2=1350530&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Fri Jun 15 08:35:00 2012
@@ -783,6 +783,25 @@ path_driver_cb_func(void **dir_baton,
return SVN_NO_ERROR;
}
+
+#else
+
+static svn_error_t *
+fetch_kind_func(svn_kind_t *kind,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *scratch_pool)
+{
+ svn_fs_root_t *root = baton;
+ svn_node_kind_t node_kind;
+
+ SVN_ERR(svn_fs_check_path(&node_kind, root, path, scratch_pool));
+
+ *kind = svn__kind_from_node_kind(node_kind, FALSE);
+ return SVN_NO_ERROR;
+}
+
#endif
@@ -948,7 +967,7 @@ svn_repos_replay2(svn_fs_root_t *root,
&send_abs_paths,
repos_root, "",
NULL, NULL,
- NULL, NULL,
+ fetch_kind_func, root,
NULL, NULL,
pool, pool));
@@ -1256,8 +1275,12 @@ replay_node(svn_fs_root_t *root,
else
{
if (copyfrom_path)
- SVN_ERR(svn_editor_copy(editor, copyfrom_path, copyfrom_rev,
- repos_relpath, SVN_INVALID_REVNUM));
+ {
+ if (copyfrom_path[0] == '/')
+ ++copyfrom_path;
+ SVN_ERR(svn_editor_copy(editor, copyfrom_path, copyfrom_rev,
+ repos_relpath, SVN_INVALID_REVNUM));
+ }
else
{
apr_array_header_t *children;