You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2011/05/26 20:24:08 UTC

svn commit: r1128017 - in /subversion/trunk/subversion: svnrdump/load_editor.c tests/cmdline/svnrdump_tests.py

Author: cmpilato
Date: Thu May 26 18:24:07 2011
New Revision: 1128017

URL: http://svn.apache.org/viewvc?rev=1128017&view=rev
Log:
Fix issue #3902 ("'svnrdump load' sends directory propchanges to the
wrong directory").

* subversion/svnrdump/load_editor.c
  (new_node_record): When the dumpstream asks us to modify an existing
    directory (propchanges only), be sure to actually open that
    directory in the editor.

* subversion/tests/cmdline/svnrdump_tests.py
  (sparse_propchanges_load): Remove @XFail decorator.

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=1128017&r1=1128016&r2=1128017&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.c Thu May 26 18:24:07 2011
@@ -678,14 +678,20 @@ new_node_record(void **node_baton,
       switch (nb->kind)
         {
         case svn_node_file:
-          /* open_file to set the file_baton so we can apply props,
-             txdelta to it */
           SVN_ERR(commit_editor->open_file(nb->path, rb->db->baton,
                                            SVN_INVALID_REVNUM, rb->pool,
                                            &(nb->file_baton)));
           break;
         default:
-          /* The directory baton has already been set */
+          SVN_ERR(commit_editor->open_directory(nb->path, rb->db->baton,
+                                                rb->rev - rb->rev_offset - 1,
+                                                rb->pool, &child_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 = apr_pstrdup(rb->pool, nb->path);
+          child_db->parent = rb->db;
+          rb->db = child_db;
           break;
         }
       break;

Modified: subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py?rev=1128017&r1=1128016&r2=1128017&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py Thu May 26 18:24:07 2011
@@ -205,7 +205,6 @@ def sparse_propchanges_dump(sbox):
   "dump: sparse file/dir propchanges"
   run_dump_test(sbox, "sparse-propchanges.dump")
 
-@XFail()
 @Issue(3902)
 def sparse_propchanges_load(sbox):
   "load: sparse file/dir propchanges"