You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/12/17 13:07:49 UTC
svn commit: r1050359 - in /subversion/trunk/subversion: libsvn_wc/entries.c
libsvn_wc/wc_db.c tests/cmdline/upgrade_tests.py
tests/cmdline/upgrade_tests_data/replaced-files.tar.bz2
Author: philip
Date: Fri Dec 17 12:07:49 2010
New Revision: 1050359
URL: http://svn.apache.org/viewvc?rev=1050359&view=rev
Log:
Make 1.6-to-wcng upgrade handle replaced files that are not copied.
* subversion/libsvn_wc/entries.c
(write_entry): Non-copied working node always has its own op_depth.
* subversion/tests/libsvn_wc/wc_db.c
(svn_wc__db_upgrade_apply_props): Tweak comment.
* subversion/tests/cmdline/upgrade_tests.py
(replaced_files): Expect and revert replacements that are not copied.
* subversion/tests/cmdline/upgrade_tests_data/replaced-files.tar.bz2:
Update to include replacements that are not copies.
Modified:
subversion/trunk/subversion/libsvn_wc/entries.c
subversion/trunk/subversion/libsvn_wc/wc_db.c
subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/replaced-files.tar.bz2
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1050359&r1=1050358&r2=1050359&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Fri Dec 17 12:07:49 2010
@@ -2061,11 +2061,8 @@ write_entry(struct write_baton **entry_n
if (!entry->copied)
{
- if (parent_node->work)
- working_node->op_depth = parent_node->work->op_depth;
- else
- working_node->op_depth
- = svn_wc__db_op_depth_for_upgrade(local_relpath);
+ working_node->op_depth
+ = svn_wc__db_op_depth_for_upgrade(local_relpath);
}
SVN_ERR(insert_working_node(sdb, working_node, scratch_pool));
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1050359&r1=1050358&r2=1050359&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri Dec 17 12:07:49 2010
@@ -7108,6 +7108,7 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
/* one row, base props only: upper row gets base props
two rows, base props only: lower row gets base props
+ two rows, revert props only: lower row gets revert props
two rows, base and revert props: upper row gets base, lower gets revert */
Modified: subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/upgrade_tests.py?rev=1050359&r1=1050358&r2=1050359&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/upgrade_tests.py Fri Dec 17 12:07:49 2010
@@ -764,30 +764,38 @@ def replaced_files(sbox):
svntest.actions.run_and_verify_svn(None, None, [],
'upgrade', sbox.wc_dir)
- # A/f is a base file that is replaced with a copy of A/g, B is a
- # working-only copy of A, and B/f is a working-only file replaced
- # with a copy of A/g
+ # A is a checked-out dir containing A/f and A/g, then
+ # svn cp wc/A wc/B
+ # svn rm wc/A/f wc/B/f
+ # svn cp wc/A/g wc/A/f # A/f replaced by copied A/g
+ # svn cp wc/A/g wc/B/f # B/f replaced by copied A/g (working-only)
+ # svn rm wc/A/g wc/B/g
+ # touch wc/A/g wc/B/g
+ # svn add wc/A/g wc/B/g # A/g replaced, B/g replaced (working-only)
+ # svn ps pX vX wc/A/g
+ # svn ps pY vY wc/B/g
expected_status = svntest.wc.State(sbox.wc_dir,
{
'' : Item(status=' ', wc_rev='5'),
'A' : Item(status=' ', wc_rev='5'),
'A/f' : Item(status='R ', wc_rev='-', copied='+'),
- 'A/g' : Item(status=' ', wc_rev='5'),
+ 'A/g' : Item(status='RM', wc_rev='5'),
'B' : Item(status='A ', wc_rev='-', copied='+'),
'B/f' : Item(status='R ', wc_rev='-', copied='+'),
- 'B/g' : Item(status=' ', wc_rev='-', copied='+'),
+ 'B/g' : Item(status='RM', wc_rev='0'),
})
run_and_verify_status_no_server(sbox.wc_dir, expected_status)
simple_property_verify(sbox.wc_dir, {
'A/f' : {'pAg' : 'vAg' },
- 'A/g' : {'pAg' : 'vAg' },
+ 'A/g' : {'pX' : 'vX' },
'B/f' : {'pAg' : 'vAg' },
- 'B/g' : {'pAg' : 'vAg' },
+ 'B/g' : {'pY' : 'vY' },
})
svntest.actions.run_and_verify_svn(None, 'Reverted.*', [], 'revert',
- sbox.ospath('A/f'), sbox.ospath('B/f'))
+ sbox.ospath('A/f'), sbox.ospath('B/f'),
+ sbox.ospath('A/g'), sbox.ospath('B/g'))
simple_property_verify(sbox.wc_dir, {
'A/f' : {'pAf' : 'vAf' },
Modified: subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/replaced-files.tar.bz2
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/replaced-files.tar.bz2?rev=1050359&r1=1050358&r2=1050359&view=diff
==============================================================================
Binary files - no diff available.