Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c	(revision 15904)
+++ subversion/libsvn_wc/update_editor.c	(working copy)
@@ -1748,8 +1748,7 @@
  *
  * Given a @a file_path either already under version control, or
  * prepared (see below) to join revision control, fully install a @a
- * new_revision of the file; @a new_revision must be 0 if copyfrom
- * args are passed, see below for details.  @a adm_access is an access
+ * new_revision of the file;  @a adm_access is an access
  * baton with a write lock for the directory containing @a file_path.
  *
  * If @a file_path is not already under version control (i.e., does
@@ -1809,8 +1808,7 @@
  * copyfrom history for the added file.  An assertion error may occur
  * if copyfrom args while @a is_add is false.  An assertion error may
  * occur if @a copyfrom_url is non-null but @a copyfrom_rev is not a
- * valid revision number.  An assertion error may occur if @a is_add
- * is true but @a new_revision is not 0.
+ * valid revision number.
  *
  * If @a diff3_cmd is non-null, then use it as the diff3 command for
  * any merging; otherwise, use the built-in merge code.
@@ -1908,8 +1906,6 @@
     {
       const char *rev_str = NULL;
       
-      assert (new_revision == 0);
-
       if (copyfrom_url)
         {
           assert (SVN_IS_VALID_REVNUM (copyfrom_rev));
@@ -2980,11 +2976,11 @@
   const char *new_URL;
   apr_array_header_t *propchanges;
   int log_number = 0;
+  const svn_wc_entry_t *ent;
 
   /* Fabricate the anticipated new URL of the target and check the
      copyfrom URL to be in the same repository. */
   {
-    const svn_wc_entry_t *ent;
     const char *dir_name, *base_name;
     
     svn_path_split (dst_path, &dir_name, &base_name, pool);
@@ -3011,7 +3007,7 @@
                          adm_access,
                          &log_number,
                          dst_path,
-                         0,
+                         ent->revision,
                          new_text_path,
                          propchanges,
                          TRUE, /* a full proplist */
Index: subversion/libsvn_client/copy.c
===================================================================
--- subversion/libsvn_client/copy.c	(revision 15905)
+++ subversion/libsvn_client/copy.c	(working copy)
@@ -851,7 +851,8 @@
     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)"),
Index: subversion/tests/clients/cmdline/copy_tests.py
===================================================================
--- subversion/tests/clients/cmdline/copy_tests.py	(revision 15904)
+++ 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__':
