Index: subversion/libsvn_wc/copy.c
===================================================================
--- subversion/libsvn_wc/copy.c	(revision 32410)
+++ subversion/libsvn_wc/copy.c	(working copy)
@@ -403,14 +403,13 @@
                              _("'%s' already exists and is in the way"),
                              svn_path_local_style(dst_path, pool));
 
-  /* Even if DST_PATH doesn't exist it may still be a versioned file; it
+  /* Even if DST_PATH doesn't exist it may still be a versioned item; it
      may be scheduled for deletion, or the user may simply have removed the
      working copy.  Since we are going to write to DST_PATH text-base and
      prop-base we need to detect such cases and abort. */
   SVN_ERR(svn_wc_entry(&dst_entry, dst_path, dst_parent, FALSE, pool));
-  if (dst_entry && dst_entry->kind == svn_node_file)
+  if (dst_entry && dst_entry->schedule != svn_wc_schedule_delete)
     {
-      if (dst_entry->schedule != svn_wc_schedule_delete)
         return svn_error_createf(SVN_ERR_ENTRY_EXISTS, NULL,
                                  _("There is already a versioned item '%s'"),
                                  svn_path_local_style(dst_path, pool));
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c	(revision 32410)
+++ subversion/libsvn_client/copy.c	(working copy)
@@ -1801,6 +1801,45 @@
 
       pair->dst = dst_path_in;
       APR_ARRAY_PUSH(copy_pairs, svn_client__copy_pair_t *) = pair;
+
+      /* Checking against copying into missing/hidden wc directory.
+         This is mostly used to correct the copy_as_child behavior of
+         svn_client_copy4/move5() functions. */
+      if (! dst_is_url)
+        {
+          svn_node_kind_t parent_kind;
+          svn_error_t *err;
+          const char *dst_parent = svn_path_dirname(dst_path_in, pool);
+          SVN_ERR(svn_io_check_path(dst_parent, &parent_kind, pool));
+          if (parent_kind != svn_node_dir)
+            {
+              const char *dst_pparent, *dst_pbase;
+              svn_boolean_t entry_exist;
+              svn_wc_adm_access_t *adm_parent;
+              const svn_wc_entry_t *parent_entry;
+              /* The container directory not exists in the disk.
+                 Check if it is a missing/hidden directory or just a normal
+                 non-existing directory. */
+              svn_path_split(dst_parent, &dst_pparent, &dst_pbase, pool);
+              err = svn_wc_adm_probe_open3(&adm_parent, NULL,
+                                             dst_pparent, FALSE, 0, 
+                                             NULL, NULL, pool);
+              if (!err)
+                {
+                  SVN_ERR(svn_wc_entry(&parent_entry, dst_pbase, 
+                                       adm_parent, TRUE, pool));
+                  entry_exist = parent_entry != NULL;
+                  SVN_ERR(svn_wc_adm_close(adm_parent));
+                  if (entry_exist)
+                    return svn_error_createf
+                      (SVN_ERR_ENTRY_EXISTS, NULL,
+                       _("Versioned path '%s' is either missing or hidden."),
+                       svn_path_local_style(dst_parent, pool));
+                }
+              else
+                svn_error_clear(err);
+            }
+        }
     }
 
   if (!srcs_are_urls && !dst_is_url)

