Author: julianfoad
Date: Tue Nov 18 12:37:02 2014
New Revision: 1640316
URL: http://svn.apache.org/r1640316
Log:
On the 'move-tracking-2' branch: Fix misuse of an element-id in 'branchify'.
* subversion/libsvn_delta/compat3b.c
(svn_branch_branchify): When replacing a subtree root element with a
subbranch root, assign it a new element id, since an element must not
change its kind.
Modified:
subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3b.c
Modified: subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3b.c
URL:
http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3b.c?rev=1640316&r1=1640315&r2=1640316&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3b.c
(original)
+++ subversion/branches/move-tracking-2/subversion/libsvn_delta/compat3b.c Tue
Nov 18 12:37:02 2014
@@ -922,8 +922,10 @@ svn_branch_branchify(svn_editor3_t *edit
svn_branch_sibling_t *
new_branch_def = svn_branch_family_add_new_branch_sibling(new_family,
new_root_eid);
+ int new_outer_eid
+ = svn_branch_family_add_new_element(outer_branch->sibling_defn->family);
svn_branch_instance_t *
- new_branch = svn_branch_add_new_branch_instance(outer_branch, outer_eid,
+ new_branch = svn_branch_add_new_branch_instance(outer_branch,
new_outer_eid,
new_branch_def,
scratch_pool);
svn_branch_el_rev_content_t *old_content;
@@ -943,10 +945,12 @@ svn_branch_branchify(svn_editor3_t *edit
new_branch, new_branch_def->root_eid,
scratch_pool));
- /* convert the old root element to a subbranch-root element (which
- implicitly deletes all its children from the old branch, if nothing
- further touches them) */
- svn_branch_map_update_as_subbranch_root(outer_branch, outer_eid,
+ /* delete the old subtree-root element (which implicitly deletes all its
+ children from the old branch, if nothing further touches them) */
+ svn_branch_map_delete(outer_branch, outer_eid);
+
+ /* replace the old subtree-root element with a new subbranch-root element */
+ svn_branch_map_update_as_subbranch_root(outer_branch, new_outer_eid,
old_content->parent_eid,
old_content->name);