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/20 08:25:50 UTC

svn commit: r998795 - in /subversion/trunk/subversion: svnrdump/dump_editor.c tests/cmdline/svnrdump_tests.py tests/cmdline/svnrdump_tests_data/dir-prop-change.dump

Author: artagnon
Date: Mon Sep 20 06:25:49 2010
New Revision: 998795

URL: http://svn.apache.org/viewvc?rev=998795&view=rev
Log:
* subversion/svnrdump/dump_editor.c
  (dump_node): Fix a bug related to removing leading slashes from
  `path` and `copyfrom_path`. When `path` or `copyfrom_path` is "/",
  increment the corresponding pointer to make the string read '\0'
  (NULL terminator).

* subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump:
  Add new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3.

* subversion/tests/cmdline/svnrdump_tests.py
  (dir_prop_change_dump, dir_prop_change_load): Add a couple of tests
  to use the added testdata.
  (test_list): Run the tests. Mark both as passing- the dump test
  passes after the bugfix in dump_editor.c.

Added:
    subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump
Modified:
    subversion/trunk/subversion/svnrdump/dump_editor.c
    subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py

Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=998795&r1=998794&r2=998795&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Mon Sep 20 06:25:49 2010
@@ -197,10 +197,10 @@ dump_node(struct dump_edit_baton *eb,
           apr_pool_t *pool)
 {
   /* Remove leading slashes from path and copyfrom_path */
-  if (path && strcmp(path, "/"))
+  if (path)
     path = ((*path == '/') ? path + 1 : path);
   
-  if (copyfrom_path && strcmp(copyfrom_path, "/"))
+  if (copyfrom_path)
     copyfrom_path = ((*copyfrom_path == '/') ?
                      copyfrom_path + 1 : copyfrom_path);
 

Modified: subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py?rev=998795&r1=998794&r2=998795&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnrdump_tests.py Mon Sep 20 06:25:49 2010
@@ -215,6 +215,14 @@ def tag_empty_trunk_load(sbox):
   "load: tag empty trunk"
   run_load_test(sbox, "tag-empty-trunk.dump")
 
+def dir_prop_change_dump(sbox):
+  "dump: directory property changes"
+  run_dump_test(sbox, "dir-prop-change.dump")
+  
+def dir_prop_change_load(sbox):
+  "load: directory property changes"
+  run_load_test(sbox, "dir-prop-change.dump")
+
 ########################################################################
 # Run the tests
 
@@ -233,6 +241,8 @@ test_list = [ None,
               modified_in_place_load,
               tag_empty_trunk_dump,
               tag_empty_trunk_load,
+              dir_prop_change_dump,
+              dir_prop_change_load,
               no_author_dump,
               no_author_load,
               Wimp("TODO", move_and_modify_in_the_same_revision_dump),

Added: subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump?rev=998795&view=auto
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump (added)
+++ subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump Mon Sep 20 06:25:49 2010
@@ -0,0 +1,48 @@
+SVN-fs-dump-format-version: 3
+
+UUID: b760f8ea-7608-0410-b9cc-88a00389c87b
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2005-12-21T23:12:28.152181Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 105
+Content-length: 105
+
+K 10
+svn:author
+V 6
+rooneg
+K 8
+svn:date
+V 27
+2005-12-21T23:12:58.931794Z
+K 7
+svn:log
+V 5
+blah
+
+PROPS-END
+
+Node-path: 
+Node-kind: dir
+Node-action: change
+Prop-delta: true
+Prop-content-length: 37
+Content-length: 37
+
+K 10
+svn:ignore
+V 6
+stuff
+
+PROPS-END
+
+