You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2010/08/01 12:18:57 UTC
svn commit: r981196 - in /subversion/trunk/subversion:
svnrdump/load_editor.c svnrdump/load_editor.h tests/cmdline/svnrdump_tests.py
Author: artagnon
Date: Sun Aug 1 10:18:57 2010
New Revision: 981196
URL: http://svn.apache.org/viewvc?rev=981196&view=rev
Log:
svnrdump: Make the skeleton_load test pass.
* subversion/tests/cmdline/svnrdump_tests.py
(test_list): Remove the Wimp marker for skeleton_load.
* subversion/svnrdump/load_editor.c
(set_property_node, delete_property_node): Fill in the functions to
call the appropriate callbacks in the commit_editor.
(set_revision_property, close_node): Remember svn:author and set it
after commit_editor has finished since it passes through.
* subversion/svnrdump/load_editor.h
(revision_baton): Add a new author field.
Modified:
subversion/trunk/subversion/svnrdump/load_editor.c
subversion/trunk/subversion/svnrdump/load_editor.h
subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py
Modified: subversion/trunk/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/load_editor.c?rev=981196&r1=981195&r2=981196&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.c Sun Aug 1 10:18:57 2010
@@ -213,10 +213,12 @@ set_revision_property(void *baton,
svn_ra_change_rev_prop(rb->pb->session, rb->rev, name, value,
rb->pb->pool);
- /* Remember any datestamp that passes through! (See comment in
- close_revision() below.) */
- if (! strcmp(name, SVN_PROP_REVISION_DATE))
+ /* Remember any datestamp/ author that passes through (see comment
+ in close_revision). */
+ if (!strcmp(name, SVN_PROP_REVISION_DATE))
rb->datestamp = svn_string_dup(value, rb->pb->pool);
+ if (!strcmp(name, SVN_PROP_REVISION_AUTHOR))
+ rb->author = svn_string_dup(value, rb->pb->pool);
return SVN_NO_ERROR;
}
@@ -226,6 +228,20 @@ set_node_property(void *baton,
const char *name,
const svn_string_t *value)
{
+ struct node_baton *nb;
+ const struct svn_delta_editor_t *commit_editor;
+ apr_pool_t *pool;
+ nb = baton;
+ commit_editor = nb->rb->pb->commit_editor;
+ pool = nb->rb->pb->pool;
+
+ if (nb->kind == svn_node_file)
+ SVN_ERR(commit_editor->change_file_prop(nb->file_baton, name,
+ value, pool));
+ else
+ SVN_ERR(commit_editor->change_dir_prop(nb->rb->dir_baton, name,
+ value, pool));
+
return SVN_NO_ERROR;
}
@@ -233,6 +249,20 @@ static svn_error_t *
delete_node_property(void *baton,
const char *name)
{
+ struct node_baton *nb;
+ const struct svn_delta_editor_t *commit_editor;
+ apr_pool_t *pool;
+ nb = baton;
+ commit_editor = nb->rb->pb->commit_editor;
+ pool = nb->rb->pb->pool;
+
+ if (nb->kind == svn_node_file)
+ SVN_ERR(commit_editor->change_file_prop(nb->file_baton, name,
+ NULL, pool));
+ else
+ SVN_ERR(commit_editor->change_dir_prop(nb->rb->dir_baton, name,
+ NULL, pool));
+
return SVN_NO_ERROR;
}
@@ -300,12 +330,14 @@ close_revision(void *baton)
else
SVN_ERR(commit_editor->close_edit(commit_edit_baton, rb->pb->pool));
- /* svn_fs_commit_txn rewrites the datestamp property to the current
- clock-time, and this is not desired. Rewrite it by hand after
- closing the commit_editor. */
+ /* svn_fs_commit_txn rewrites the datestamp/ author property-
+ rewrite it by hand after closing the commit_editor. */
SVN_ERR(svn_ra_change_rev_prop(rb->pb->session, rb->rev,
SVN_PROP_REVISION_DATE,
rb->datestamp, rb->pb->pool));
+ SVN_ERR(svn_ra_change_rev_prop(rb->pb->session, rb->rev,
+ SVN_PROP_REVISION_AUTHOR,
+ rb->author, rb->pb->pool));
svn_pool_destroy(rb->pb->pool);
Modified: subversion/trunk/subversion/svnrdump/load_editor.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/load_editor.h?rev=981196&r1=981195&r2=981196&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.h (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.h Sun Aug 1 10:18:57 2010
@@ -67,6 +67,7 @@ struct revision_baton
apr_hash_t *revprop_table;
const svn_string_t *datestamp;
+ const svn_string_t *author;
struct parse_baton *pb;
apr_pool_t *pool;
Modified: subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py?rev=981196&r1=981195&r2=981196&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py Sun Aug 1 10:18:57 2010
@@ -171,7 +171,7 @@ test_list = [ None,
basic_dump,
revision_0_dump,
revision_0_load,
- Wimp("Under construction", skeleton_load),
+ skeleton_load,
Wimp("Need to fix headers in RA layer", copy_and_modify),
]