Author: philip
Date: Wed May 25 16:30:48 2011
New Revision: 1127575
URL: http://svn.apache.org/viewvc?rev=1127575&view=rev
Log:
The changes in r1126577 also fixed upgrade with replaced directories.
* subversion/libsvn_wc/entries.c
(write_entry): Remove asserts and errors about unsupported upgrades.
* subversion/tests/cmdline/upgrade_tests.py
(tree_replace1, tree_replace2): Remove XFAIL, add status check post-upgrade.
Modified:
subversion/trunk/subversion/libsvn_wc/entries.c
subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1127575&r1=1127574&r2=1127575&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Wed May 25 16:30:48 2011
@@ -1638,19 +1638,10 @@ write_entry(struct write_baton **entry_n
break;
case svn_wc_schedule_add:
- SVN_ERR_ASSERT((parent_node->base && !parent_node->work)
- || (parent_node->work && !parent_node->base));
working_node = MAYBE_ALLOC(working_node, result_pool);
break;
case svn_wc_schedule_delete:
- if (entry->copied)
- return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- _("Cannot upgrade with copied/replaced directory '%s'"),
- svn_dirent_local_style(parent_node->base->local_relpath,
- scratch_pool));
-
- SVN_ERR_ASSERT(!entry->copied);
working_node = MAYBE_ALLOC(working_node, result_pool);
if (parent_node->base)
base_node = MAYBE_ALLOC(base_node, result_pool);
@@ -1659,14 +1650,6 @@ write_entry(struct write_baton **entry_n
break;
case svn_wc_schedule_replace:
- if (parent_node->base && parent_node->work)
- return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- _("Cannot upgrade with copied/replaced directory '%s'"),
- svn_dirent_local_style(parent_node->base->local_relpath,
- scratch_pool));
-
- SVN_ERR_ASSERT((parent_node->base && !parent_node->work)
- || (parent_node->work && !parent_node->base));
working_node = MAYBE_ALLOC(working_node, result_pool);
if (parent_node->base)
base_node = MAYBE_ALLOC(base_node, result_pool);
Modified: subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/upgrade_tests.py?rev=1127575&r1=1127574&r2=1127575&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/upgrade_tests.py Wed May 25
16:30:48 2011
@@ -871,7 +871,6 @@ def upgrade_with_scheduled_change(sbox):
})
run_and_verify_status_no_server(sbox.wc_dir, expected_status)
-@XFail()
@Issue(3777)
def tree_replace1(sbox):
"upgrade 1.6 with tree replaced"
@@ -881,44 +880,22 @@ def tree_replace1(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'upgrade', sbox.wc_dir)
- ### Check status (once upgrade no longer asserts)
-
- # The working copy contains a tree B that is deleted and replaced by a
- # an another tree:
- #
- # deleted replaced by
- # B B
- # B/f B/f
- # B/g
- # B/h
- # B/C B/C
- # B/C/f B/C/f
- # B/D
- # B/D/f
- # B/E
- # B/E/f
-
- # 1.6 status:
- # M wc
- # R + wc/B
- # R + wc/B/C
- # R + wc/B/C/f
- # D + wc/B/D
- # D + wc/B/D/f
- # A + wc/B/E
- # A + wc/B/E/f
- # R + wc/B/f
- # D + wc/B/g
- # A + wc/B/h
-
- # 1.7 status:
- # M wc
- # R + wc/B
- # D wc/B/D
- # D wc/B/D/f
- # D wc/B/g
+ expected_status = svntest.wc.State(sbox.wc_dir,
+ {
+ '' : Item(status=' M', wc_rev=17),
+ 'B' : Item(status='R ', copied='+', wc_rev='-'),
+ 'B/f' : Item(status='R ', copied='+', wc_rev='-'),
+ 'B/g' : Item(status='D ', wc_rev=17),
+ 'B/h' : Item(status='A ', copied='+', wc_rev='-'),
+ 'B/C' : Item(status='R ', copied='+', wc_rev='-'),
+ 'B/C/f' : Item(status='R ', copied='+', wc_rev='-'),
+ 'B/D' : Item(status='D ', wc_rev=17),
+ 'B/D/f' : Item(status='D ', wc_rev=17),
+ 'B/E' : Item(status='A ', copied='+', wc_rev='-'),
+ 'B/E/f' : Item(status='A ', copied='+', wc_rev='-'),
+ })
+ run_and_verify_status_no_server(sbox.wc_dir, expected_status)
-@XFail()
@Issue(3777)
def tree_replace2(sbox):
"upgrade 1.6 with tree replaced (2)"
@@ -928,22 +905,21 @@ def tree_replace2(sbox):
svntest.actions.run_and_verify_svn(None, None, [], 'upgrade', sbox.wc_dir)
- ### Check status (once upgrade no longer asserts)
-
- # The working copy contains two trees B and C that have replaced
- # each other
-
- # deleted replaced by
- # B B
- # B/f
- # B/D
- # B/g
- # B/E
- # C C
- # C/f
- # C/D
- # C/g
- # C/E
+ expected_status = svntest.wc.State(sbox.wc_dir,
+ {
+ '' : Item(status=' M', wc_rev=12),
+ 'B' : Item(status='R ', copied='+', wc_rev='-'),
+ 'B/f' : Item(status='D ', wc_rev=12),
+ 'B/D' : Item(status='D ', wc_rev=12),
+ 'B/g' : Item(status='A ', copied='+', wc_rev='-'),
+ 'B/E' : Item(status='A ', copied='+', wc_rev='-'),
+ 'C' : Item(status='R ', copied='+', wc_rev='-'),
+ 'C/f' : Item(status='A ', copied='+', wc_rev='-'),
+ 'C/D' : Item(status='A ', copied='+', wc_rev='-'),
+ 'C/g' : Item(status='D ', wc_rev=12),
+ 'C/E' : Item(status='D ', wc_rev=12),
+ })
+ run_and_verify_status_no_server(sbox.wc_dir, expected_status)
@XFail() # Requires WC format >= 29.
def upgrade_from_format_28(sbox):