subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcor...@apache.org
Subject svn commit: r1124469 - in /subversion/trunk/subversion: libsvn_client/cmdline.c tests/cmdline/copy_tests.py
Date Wed, 18 May 2011 23:52:46 GMT
Author: jcorvel
Date: Wed May 18 23:52:46 2011
New Revision: 1124469

URL: http://svn.apache.org/viewvc?rev=1124469&view=rev
Log:
With rhuijben, fix issue #3865: 'svn' on Windows cannot address 
scheduled-for-delete file, if another file differing only in case is present
on disk.

* subversion/libsvn_client/cmdline.c
  (svn_client_args_to_target_array): After calling 
   svn_opt__arg_canonicalize_path, check if it returned a path different from
   the original one (indicating a change due to truepath conversion). If so,
   perform an additional check to see if the original path has an exact match
   to an entry in the wc-db. If that is the case, use the original path
   instead of the truepath-converted one.
* subversion/tests/cmdline/copy_tests.py
  (deleted_file_with_case_clash): Remove XFail marker.

Modified:
    subversion/trunk/subversion/libsvn_client/cmdline.c
    subversion/trunk/subversion/tests/cmdline/copy_tests.py

Modified: subversion/trunk/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cmdline.c?rev=1124469&r1=1124468&r2=1124469&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/cmdline.c (original)
+++ subversion/trunk/subversion/libsvn_client/cmdline.c Wed May 18 23:52:46 2011
@@ -254,10 +254,41 @@ svn_client_args_to_target_array(apr_arra
           else  /* not a url, so treat as a path */
             {
               const char *base_name;
+              const char *original_target;
 
+              original_target = svn_dirent_internal_style(true_target, pool);
               SVN_ERR(svn_opt__arg_canonicalize_path(&true_target,
                                                      true_target, pool));
 
+              /* If there was a truepath-conversion (which can happen on
+                 case-insensitive filesystems), check if there is an exact
+                 match in the wc-db (e.g. a scheduled-for-delete file only
+                 differing in case from an on-disk file).  If so, use that
+                 instead of the truepath converted variant. */
+              if (strcmp(original_target, true_target) != 0)
+                {
+                  const char *target_abspath;
+                  svn_node_kind_t kind;
+                  svn_error_t *err2;
+
+                  SVN_ERR(svn_dirent_get_absolute(&target_abspath, 
+                                                  original_target, pool));
+                  err2 = svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath,
+                                          FALSE, pool);
+                  if (err2 && err2->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
+                    {
+                      svn_error_clear(err2);
+                    }
+                  else
+                    {
+                      SVN_ERR(err2);
+                      /* We successfully did a lookup in the wc-db. Now see
+                         if it's something interesting. */
+                      if (kind == svn_node_file || kind == svn_node_dir)
+                        true_target = original_target;
+                    }
+                }
+              
               /* If the target has the same name as a Subversion
                  working copy administrative dir, skip it. */
               base_name = svn_dirent_basename(true_target, pool);

Modified: subversion/trunk/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/copy_tests.py?rev=1124469&r1=1124468&r2=1124469&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/copy_tests.py Wed May 18 23:52:46 2011
@@ -5123,7 +5123,6 @@ def copy_url_shortcut(sbox):
 # Regression test for issue #3865: 'svn' on Windows cannot address
 # scheduled-for-delete file, if another file differing only in case is
 # present on disk
-@XFail(svntest.main.is_fs_case_insensitive)
 @Issue(3865)
 def deleted_file_with_case_clash(sbox):
   """address a deleted file hidden by case clash"""



Mime
View raw message