Author: hwright
Date: Fri Aug 5 15:02:26 2011
New Revision: 1154251
URL: http://svn.apache.org/viewvc?rev=1154251&view=rev
Log:
Reintegrate the 1.7.x-r1152189 branch:
* r1152189, r1152190
Fix an assertion on copying nodes that are not presence normal.
Branch:
1.7.x-r1152189
Justification:
Easy to trigger problem in tree conflict situations.
Votes:
+1: rhuijben, philip, gstein
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_wc/copy.c
subversion/branches/1.7.x/subversion/tests/cmdline/copy_tests.py
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 5 15:02:26 2011
@@ -1,5 +1,6 @@
/subversion/branches/1.5.x-r30215:870312
/subversion/branches/1.7.x-issue3888:1148937-1149162
+/subversion/branches/1.7.x-r1152189:1152759-1154249
/subversion/branches/atomic-revprop:965046-1000689
/subversion/branches/bdb-reverse-deltas:872050-872529
/subversion/branches/diff-callbacks3:870059-870761
@@ -54,4 +55,4 @@
/subversion/branches/tree-conflicts:868291-873154
/subversion/branches/tree-conflicts-notify:873926-874008
/subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151911,1152129,1152140,1152282,1152726,1153416,1153799,1153807,1153968,1154023
+/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151911,1152129,1152140,1152189-1152190,1152282,1152726,1153416,1153799,1153807,1153968,1154023
Modified: subversion/branches/1.7.x/STATUS
URL:
http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1154251&r1=1154250&r2=1154251&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Fri Aug 5 15:02:26 2011
@@ -153,12 +153,3 @@ Approved changes:
r1153141 removes an accidentally added SVN_DBG() from r1153138.
Votes:
+1: rhuijben, gstein, philip
-
-* r1152189, r1152190
- Fix an assertion on copying nodes that are not presence normal.
- Branch:
- 1.7.x-r1152189
- Justification:
- Easy to trigger problem in tree conflict situations.
- Votes:
- +1: rhuijben, philip, gstein
Modified: subversion/branches/1.7.x/subversion/libsvn_wc/copy.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/copy.c?rev=1154251&r1=1154250&r2=1154251&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/copy.c Fri Aug 5 15:02:26
2011
@@ -615,6 +615,23 @@ svn_wc_copy3(svn_wc_context_t *wc_ctx,
else
SVN_ERR(err);
+ switch (src_status)
+ {
+ case svn_wc__db_status_deleted:
+ return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
+ _("Deleted node '%s' can't be copied."),
+ svn_dirent_local_style(src_abspath,
+ scratch_pool));
+
+ case svn_wc__db_status_excluded:
+ case svn_wc__db_status_server_excluded:
+ case svn_wc__db_status_not_present:
+ return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
+ _("The node '%s' was not found."),
+ svn_dirent_local_style(src_abspath,
+ scratch_pool));
+ }
+
SVN_ERR(svn_wc__db_read_info(&dstdir_status, NULL, NULL, NULL,
&dst_repos_root_url, &dst_repos_uuid, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
Modified: subversion/branches/1.7.x/subversion/tests/cmdline/copy_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/copy_tests.py?rev=1154251&r1=1154250&r2=1154251&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/1.7.x/subversion/tests/cmdline/copy_tests.py Fri Aug 5
15:02:26 2011
@@ -5441,6 +5441,35 @@ def copy_and_move_conflicts(sbox):
})
svntest.actions.verify_disk(wc('move-dest'), expected_disk, True)
+def copy_deleted_dir(sbox):
+ "try to copy a deleted directory that exists"
+ sbox.build(read_only = True)
+
+ sbox.simple_rm('iota')
+ sbox.simple_rm('A')
+
+ svntest.actions.run_and_verify_svn(None, None,
+ 'svn: E145000: Path.* does not exist',
+ 'cp', sbox.ospath('iota'),
+ sbox.ospath('new_iota'))
+ svntest.actions.run_and_verify_svn(None, None,
+ 'svn: E145000: Path.* does not exist',
+ 'cp', sbox.ospath('A/D'),
+ sbox.ospath('new_D'))
+
+ svntest.main.file_write(sbox.ospath('iota'), 'Not iota!')
+ os.mkdir(sbox.ospath('A'))
+ os.mkdir(sbox.ospath('A/D'))
+
+ # These two invocations raise an assertion.
+ svntest.actions.run_and_verify_svn(None, None,
+ 'svn: E155035: Deleted node.* can\'t
be.*',
+ 'cp', sbox.ospath('iota'),
+ sbox.ospath('new_iota'))
+ svntest.actions.run_and_verify_svn(None, None,
+ 'svn: E155035: Deleted node.* can\'t
be.*',
+ 'cp', sbox.ospath('A/D'),
+ sbox.ospath('new_D'))
########################################################################
# Run the tests
@@ -5551,6 +5580,7 @@ test_list = [ None,
copy_base_of_deleted,
case_only_rename,
copy_and_move_conflicts,
+ copy_deleted_dir,
]
if __name__ == '__main__':