You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/06/03 12:11:01 UTC
svn commit: r950933 - in /subversion/trunk/subversion: libsvn_wc/copy.c
tests/cmdline/copy_tests.py
Author: stylesen
Date: Thu Jun 3 10:11:00 2010
New Revision: 950933
URL: http://svn.apache.org/viewvc?rev=950933&view=rev
Log:
Fix issue #3303 - cannot copy broken symlink.
* subversion/libsvn_wc/copy.c
(copy_added_file_administratively): Introduce check for symlinks
before copying a file.
* subversion/tests/cmdline/copy_tests.py
(test_list): Remove XFail marker for copy_broken_symlink test case.
Modified:
subversion/trunk/subversion/libsvn_wc/copy.c
subversion/trunk/subversion/tests/cmdline/copy_tests.py
Modified: subversion/trunk/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=950933&r1=950932&r2=950933&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/copy.c (original)
+++ subversion/trunk/subversion/libsvn_wc/copy.c Thu Jun 3 10:11:00 2010
@@ -101,8 +101,18 @@ copy_added_file_administratively(svn_wc_
void *notify_baton,
apr_pool_t *scratch_pool)
{
+ svn_node_kind_t kind;
+ svn_boolean_t is_special;
+
+ /* Check to see if this is a special file. */
+ SVN_ERR(svn_io_check_special_path(src_abspath, &kind, &is_special,
+ scratch_pool));
+
/* Copy this file and possibly put it under version control. */
- SVN_ERR(svn_io_copy_file(src_abspath, dst_abspath, TRUE, scratch_pool));
+ if (is_special)
+ SVN_ERR(svn_io_copy_link(src_abspath, dst_abspath, scratch_pool));
+ else
+ SVN_ERR(svn_io_copy_file(src_abspath, dst_abspath, TRUE, scratch_pool));
if (src_is_added)
{
Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=950933&r1=950932&r2=950933&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Thu Jun 3 10:11:00 2010
@@ -4583,7 +4583,7 @@ test_list = [ None,
reverse_merge_move,
XFail(nonrecursive_commit_of_copy),
XFail(copy_added_dir_with_copy),
- XFail(SkipUnless(copy_broken_symlink, svntest.main.is_posix_os)),
+ SkipUnless(copy_broken_symlink, svntest.main.is_posix_os),
]
if __name__ == '__main__':