Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c        (revision 15923)
+++ subversion/libsvn_wc/update_editor.c        (working copy)
@@ -2117,20 +2117,20 @@
      'absent' entry, be sure to remove the hiddenness. */
   revision_str = apr_psprintf (pool, "%ld", new_revision);
   svn_xml_make_open_tag (&log_accum,
-                         pool,
-                         svn_xml_self_closing,
-                         SVN_WC__LOG_MODIFY_ENTRY,
-                         SVN_WC__LOG_ATTR_NAME,
-                         base_name,
-                         SVN_WC__ENTRY_ATTR_KIND,
-                         SVN_WC__ENTRIES_ATTR_FILE_STR,
-                         SVN_WC__ENTRY_ATTR_REVISION,
-                         revision_str,
-                         SVN_WC__ENTRY_ATTR_DELETED,
-                         "false",
-                         SVN_WC__ENTRY_ATTR_ABSENT,
-                         "false",
-                         NULL);
+                         pool,
+                         svn_xml_self_closing,
+                         SVN_WC__LOG_MODIFY_ENTRY,
+                         SVN_WC__LOG_ATTR_NAME,
+                         base_name,
+                         SVN_WC__ENTRY_ATTR_KIND,
+                         SVN_WC__ENTRIES_ATTR_FILE_STR,
+                         SVN_WC__ENTRY_ATTR_DELETED,
+                         "false",
+                         SVN_WC__ENTRY_ATTR_ABSENT,
+                         "false",
+                         new_revision ? SVN_WC__ENTRY_ATTR_REVISION : NULL,
+                         new_revision ? revision_str : NULL,
+                         NULL);
 
 
   /* Possibly install a *non*-inherited URL in the entry. */
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c     (revision 15923)
+++ subversion/libsvn_client/copy.c     (working copy)
@@ -851,13 +851,14 @@
     const svn_wc_entry_t *ent;
 
     SVN_ERR (svn_wc_entry (&ent, dst_path, adm_access, FALSE, pool));
-    if (ent && (ent->kind != svn_node_dir))
+    if (ent && (ent->kind != svn_node_dir) && 
+        (ent->schedule != svn_wc_schedule_delete))
       return svn_error_createf
         (SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
          _("Entry for '%s' exists (though the working file is missing)"),
          svn_path_local_style (dst_path, pool));
   }
-
+  
   /* Decide whether the two repositories are the same or not. */
   { 
     svn_error_t *src_err, *dst_err;
Index: subversion/tests/clients/cmdline/copy_tests.py
===================================================================
--- subversion/tests/clients/cmdline/copy_tests.py      (revision 15923)
+++ subversion/tests/clients/cmdline/copy_tests.py      (working copy)
@@ -905,7 +905,7 @@
 
   expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
   expected_output.add({
-    'pi' : Item(status='A ',  wc_rev='0'),
+    'pi' : Item(status='A ',  wc_rev='1'),
     })
   svntest.actions.run_and_verify_status (wc_dir, expected_output)
 
@@ -1730,6 +1730,42 @@
                                         wc_dir)
 
 
+def repos_to_wc_copy_replacement(sbox):
+  "svn cp URL PATH replacement of deleted target"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # File scheduled for deletion
+  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
+  svntest.actions.run_and_verify_svn(None, None, [], 'rm', rho_path)
+
+  # Status before attempting copies
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.tweak('A/D/G/rho', status='D ')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  # The copy shouldn't fail
+  pi_url = svntest.main.current_repo_url + "/A/D/G/pi"
+  svntest.actions.run_and_verify_svn("", None, None,
+                                     'cp', pi_url, rho_path)
+
+  # Now commit
+  expected_status.tweak('A/D/G/rho', status='R ', copied='+', wc_rev='-')
+  svntest.actions.run_and_verify_status(wc_dir, expected_status)
+
+  expected_status.tweak(repos_rev='2')
+  expected_status.tweak('A/D/G/rho', status='  ', copied=None,
+                        repos_rev='2', wc_rev='2')
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/D/G/rho': Item(verb='Replacing'),
+    })
+  svntest.actions.run_and_verify_commit(wc_dir,
+                                        expected_output,
+                                        expected_status,
+                                        None, None, None, None, None,
+                                        wc_dir)
+
 ########################################################################
 # Run the tests
 
@@ -1767,6 +1803,7 @@
               mixed_wc_to_url,
               wc_copy_replacement,
               wc_copy_replace_with_props,
+              repos_to_wc_copy_replacement,
              ]
 
 if __name__ == '__main__':
