subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From style...@apache.org
Subject svn commit: r950933 - in /subversion/trunk/subversion: libsvn_wc/copy.c tests/cmdline/copy_tests.py
Date Thu, 03 Jun 2010 10:11:01 GMT
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__':



Mime
View raw message