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 14:27:32 UTC
svn commit: r1350596 - /subversion/trunk/subversion/libsvn_repos/replay.c
Author: hwright
Date: Fri Jun 15 12:27:31 2012
New Revision: 1350596
URL: http://svn.apache.org/viewvc?rev=1350596&view=rev
Log:
Properly handle directories with changed properties in Ev2 replay.
* subversion/libsvn_repos/replay.c
(fetch_props_func): New.
(svn_repos_replay2): When using the Ev2 wrapper, use the proper fetch props
func.
(replay_node): Make sure we call alter_directory when we have prop mods.
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=1350596&r1=1350595&r2=1350596&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/replay.c (original)
+++ subversion/trunk/subversion/libsvn_repos/replay.c Fri Jun 15 12:27:31 2012
@@ -802,6 +802,27 @@ fetch_kind_func(svn_kind_t *kind,
return SVN_NO_ERROR;
}
+static svn_error_t *
+fetch_props_func(apr_hash_t **props,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_fs_root_t *root = baton;
+ svn_fs_root_t *prev_root;
+ svn_fs_t *fs = svn_fs_root_fs(root);
+
+ SVN_ERR(svn_fs_revision_root(&prev_root, fs,
+ svn_fs_revision_root_revision(root) - 1,
+ scratch_pool));
+
+ SVN_ERR(svn_fs_node_proplist(props, prev_root, path, result_pool));
+
+ return SVN_NO_ERROR;
+}
+
#endif
@@ -968,7 +989,7 @@ svn_repos_replay2(svn_fs_root_t *root,
repos_root, "",
NULL, NULL,
fetch_kind_func, root,
- NULL, NULL,
+ fetch_props_func, root,
pool, pool));
/* Tell the shim that we're starting the process. */
@@ -1414,7 +1435,7 @@ replay_node(svn_fs_root_t *root,
/* Handle textual modifications. */
if (change->node_kind == svn_node_file
- && (change->text_mod || downgraded_copy))
+ && (change->text_mod || change->prop_mod || downgraded_copy))
{
svn_checksum_t *checksum;
svn_stream_t *contents;
@@ -1430,6 +1451,16 @@ replay_node(svn_fs_root_t *root,
SVN_INVALID_REVNUM, props, checksum,
contents));
}
+
+ if (change->node_kind == svn_node_dir
+ && (change->prop_mod || downgraded_copy))
+ {
+ apr_array_header_t *children = NULL;
+
+ SVN_ERR(svn_editor_alter_directory(editor, repos_relpath,
+ SVN_INVALID_REVNUM, children,
+ props));
+ }
}
return SVN_NO_ERROR;