It could be that it is already there, but there should be inheritance of copyfrom values within added directories.
Only when the revision number (or path) changes you will get a new copyfrom. (This is what you see on a mixed revision copy… There should also be a delete in that case now, although we used to forget these while committing in older versions)
Sent from Windows Mail
From: Julian Foad
Sent: Thursday, January 15, 2015 3:12 PM
To: Branko Čibej
I found in another bug in 'svnrdump load'.
When my additional testing runs 'svnrdump load' on a dumpfile produced by 'svnadmin dump' (non-deltas mode), some tests including copy_tests.py 7 and 11 fail.
When loading an add-with-history froma non-deltas dumpfile, on reading the new properties, the dumpfile parser first calls the rdump load editor's 'remove_node_props' method. This method was attempting to issue property delete instructions for each existing property, but it was always trying to fetch the existing props from PATH_at_HEAD. In a copy situation, it needs to look at COPYFROM_PATH_at_COPYFROM_REV instead. If PATH_at_HEAD didn't exist it would error out, and if it did exist it would then proceed to delete each of the props found there, which may not include all of the props that the new node will inherit from its copy source.
A patch like the following fixes it. (I know there's bad indentation there at the moment.)
I'm currently writing regression tests for it.
--- subversion/svnrdump/load_editor.c (revision 1652027)
+++ subversion/svnrdump/load_editor.c (working copy)
@@ -121,6 +121,7 @@ struct node_baton
const char *copyfrom_path;
+ const char *copyfrom_url;
const char *base_checksum;
@@ -767,9 +768,9 @@ new_node_record(void **node_baton,
nb->copyfrom_path = svn_relpath_join(rb->pb->parent_dir,
- nb->copyfrom_path = svn_path_url_add_component2(rb->pb->root_url,
+ nb->copyfrom_url = svn_path_url_add_component2(rb->pb->root_url,
@@ -789,7 +790,7 @@ new_node_record(void **node_baton,
LDR_DBG(("Added file %s to dir %p as %p\n",
@@ -797,7 +798,7 @@ new_node_record(void **node_baton,
LDR_DBG(("Added dir %s to dir %p as %p\n",
@@ -1003,11 +1004,19 @@ remove_node_props(void *baton)
if (nb->kind == svn_node_file)
+ if (nb->copyfrom_path)
+ SVN_ERR(svn_ra_get_file(nb->rb->pb->aux_session, nb->copyfrom_path,
+ nb->copyfrom_rev, NULL, NULL, &props, pool));
SVN_INVALID_REVNUM, NULL, NULL, &props, pool));
else /* nb->kind == svn_node_dir */
+ if (nb->copyfrom_path)
+ SVN_ERR(svn_ra_get_dir2(nb->rb->pb->aux_session, NULL, NULL, &props,
+ nb->copyfrom_path, nb->copyfrom_rev, 0, pool));
SVN_ERR(svn_ra_get_dir2(nb->rb->pb->aux_session, NULL, NULL, &props,
nb->path, SVN_INVALID_REVNUM, 0, pool));
Received on 2015-01-15 15:23:54 CET