Hi,

attached a patch to a wrong and confusing error message.

[[
libsvn_client: improve error when copying to unversioned dir

When trying to copy a file to an unversioned (but existing)
directory '/foo/bar', subversion will happily claim that "Path
'/foo/bar' is not a directory", which is obviously wrong. Fix the
issue by instead noticing the user that '/foo/bar' is actually
not a _versioned_ directory.

- subversion/libsvn_client/copy.c:
  * (verify_wc_dsts): improve error messages
- subversion/tests/cmdline/copy_tests.py:
  * (copy_into_missing_dir): adjust expected error message
- subversion/tests/cmdline/input_validation_tests.py:
  * (invalid_copy_target): adjust expected error message
]]

Regards
-- 
Patrick Steinhardt, Entwickler

elego Software Solutions GmbH, http://www.elego.de
Gebäude 12 (BIG), Gustav-Meyer-Allee 25, 13355 Berlin, Germany

Sitz der Gesellschaft: Berlin, USt-IdNr.: DE 163214194
Handelsregister: Amtsgericht Charlottenburg HRB 77719
Geschäftsführer: Olaf Wagner
diff --git a/subversion/libsvn_client/copy.c b/subversion/libsvn_client/copy.c
index 857d340..1fded02 100644
--- a/subversion/libsvn_client/copy.c
+++ b/subversion/libsvn_client/copy.c
@@ -1065,7 +1065,7 @@ verify_wc_dsts(const apr_array_header_t *copy_pairs,
       else if (dst_parent_kind != svn_node_dir)
         {
           return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                                   _("Path '%s' is not a directory"),
+                                   _("Path '%s' is not a versioned directory"),
                                    svn_dirent_local_style(
                                      pair->dst_parent_abspath, scratch_pool));
         }
@@ -1075,7 +1075,7 @@ verify_wc_dsts(const apr_array_header_t *copy_pairs,
 
       if (dst_parent_kind != svn_node_dir)
         return svn_error_createf(SVN_ERR_WC_MISSING, NULL,
-                                 _("Path '%s' is not a directory"),
+                                 _("Path '%s' is not a versioned directory"),
                                  svn_dirent_local_style(
                                      pair->dst_parent_abspath, scratch_pool));
     }
diff --git a/subversion/tests/cmdline/copy_tests.py b/subversion/tests/cmdline/copy_tests.py
index 3bb8599..055d88b 100755
--- a/subversion/tests/cmdline/copy_tests.py
+++ b/subversion/tests/cmdline/copy_tests.py
@@ -3864,7 +3864,7 @@ def copy_into_missing_dir(sbox):
   #     svn: Error processing command 'modify-entry' in '.'
   #     svn: Error modifying entry for 'A'
   #     svn: Entry 'A' is already under version control
-  svntest.actions.run_and_verify_svn(None, ".*: Path '.*' is not a directory",
+  svntest.actions.run_and_verify_svn(None, ".*: Path '.*' is not a versioned directory",
                                      'cp', iota_path, A_path)
 
   # 'cleanup' should not error.
diff --git a/subversion/tests/cmdline/input_validation_tests.py b/subversion/tests/cmdline/input_validation_tests.py
index e1d74a6..48ee5bb 100755
--- a/subversion/tests/cmdline/input_validation_tests.py
+++ b/subversion/tests/cmdline/input_validation_tests.py
@@ -104,7 +104,7 @@ def invalid_copy_target(sbox):
   sbox.build(read_only=True)
   mu_path = os.path.join('A', 'mu')
   C_path = os.path.join('A', 'C')
-  run_and_verify_svn_in_wc(sbox, "svn: E155(007|010): Path '.*' is not a directory",
+  run_and_verify_svn_in_wc(sbox, "svn: E155(007|010): Path '.*' is not a versioned directory",
                            'copy', mu_path, C_path, "iota")
 
 def invalid_delete_targets(sbox):

Attachment: signature.asc
Description: PGP signature

Reply via email to