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/09/21 20:45:05 UTC
svn commit: r999536 - in /subversion/trunk/subversion:
svnrdump/load_editor.c tests/cmdline/svnrdump_tests.py
Author: artagnon
Date: Tue Sep 21 18:45:05 2010
New Revision: 999536
URL: http://svn.apache.org/viewvc?rev=999536&view=rev
Log:
svnrdump: Fix a bug in the load_editor related to opening directories
recursively until the desired path is reached.
* subversion/svnrdump/load_editor.c
(new_node_record): The delta editor's `open_directory` requires the
full relative path after `ancestor_path`, not just a path
component. Since we're anyway building up `rb->db->relpath` using
the individual components, rip off the `ancestor_path` from it
before using it with `open_directory`.
* subversion/tests/cmdline/svnrdump_tests.py
(test_list): Pass the copy_revprops_load test.
Modified:
subversion/trunk/subversion/svnrdump/load_editor.c
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=999536&r1=999535&r2=999536&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.c Tue Sep 21 18:45:05 2010
@@ -182,6 +182,8 @@ new_node_record(void **node_baton,
void *commit_edit_baton;
char *ancestor_path;
apr_array_header_t *residual_open_path;
+ char *residual_compose_path;
+ char *relpath_compose;
const char *nb_dirname;
apr_size_t residual_close_count;
int i;
@@ -304,8 +306,14 @@ new_node_record(void **node_baton,
for (i = 0; i < residual_open_path->nelts; i ++)
{
- SVN_ERR(commit_editor->open_directory(APR_ARRAY_IDX(residual_open_path,
- i, const char *),
+ relpath_compose =
+ svn_relpath_join(rb->db->relpath,
+ APR_ARRAY_IDX(residual_open_path, i, const char *),
+ rb->pool);
+ residual_compose_path =
+ svn_relpath_skip_ancestor(ancestor_path,
+ relpath_compose);
+ SVN_ERR(commit_editor->open_directory(residual_compose_path,
rb->db->baton,
rb->rev - 1,
rb->pool, &child_baton));
@@ -313,10 +321,7 @@ new_node_record(void **node_baton,
child_db = apr_pcalloc(rb->pool, sizeof(*child_db));
child_db->baton = child_baton;
child_db->depth = rb->db->depth + 1;
- child_db->relpath = svn_relpath_join(rb->db->relpath,
- APR_ARRAY_IDX(residual_open_path,
- i, const char *),
- rb->pool);
+ child_db->relpath = relpath_compose;
child_db->parent = rb->db;
rb->db = child_db;
}
Modified: subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py?rev=999536&r1=999535&r2=999536&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py Tue Sep 21 18:45:05 2010
@@ -276,7 +276,7 @@ test_list = [ None,
url_encoding_dump,
url_encoding_load,
copy_revprops_dump,
- Wimp("TODO", copy_revprops_load, svntest.main.is_ra_type_file),
+ copy_revprops_load,
no_author_dump,
no_author_load,
Wimp("TODO", move_and_modify_in_the_same_revision_dump),