Index: subversion/libsvn_wc/update_editor.c
===================================================================
--- subversion/libsvn_wc/update_editor.c	(revision 16158)
+++ subversion/libsvn_wc/update_editor.c	(working copy)
@@ -2958,6 +2958,7 @@
   apr_array_header_t *propchanges;
   int log_number = 0;
   const svn_wc_entry_t *ent;
+  const svn_wc_entry_t *dst_entry;
 
   /* Fabricate the anticipated new URL of the target and check the
      copyfrom URL to be in the same repository. */
@@ -2975,6 +2976,33 @@
                                   " root than '%s'"),
                                 copyfrom_url, ent->repos);
   }
+
+  /* If we're replacing the file then we need to save the destination files
+   * text base and prop base before replacing it. This allows us to revert
+   * the entire change. */
+  SVN_ERR (svn_wc_entry (&dst_entry, dst_path, adm_access, FALSE, pool));
+  if (dst_entry && dst_entry->schedule == svn_wc_schedule_delete)
+    {
+      const char *dst_rtext = svn_wc__text_revert_path (dst_path, FALSE,
+                                                        pool);
+      const char *dst_txtb = svn_wc__text_base_path (dst_path, FALSE, pool);
+      const char *dst_rprop;
+      const char *dst_bprop;
+      svn_node_kind_t kind;
+
+      SVN_ERR (svn_wc__prop_revert_path (&dst_rprop, dst_path,
+                                         adm_access, FALSE, pool));
+
+      SVN_ERR (svn_wc__prop_base_path (&dst_bprop, dst_path,
+                                       adm_access, FALSE, pool));
+
+      SVN_ERR (svn_io_copy_file (dst_txtb, dst_rtext, TRUE, pool));
+      
+      /* If prop base exist, copy it to revert base. */
+      SVN_ERR (svn_io_check_path(dst_bprop, &kind, pool));
+      if (kind == svn_node_file)
+        SVN_ERR (svn_io_copy_file (dst_bprop, dst_rprop, TRUE, pool));
+    }
   
   /* Construct the new properties.  Passing an empty hash for the
      source props will result in the right kind of prop array for
Index: subversion/tests/clients/cmdline/revert_tests.py
===================================================================
--- subversion/tests/clients/cmdline/revert_tests.py	(revision 16158)
+++ subversion/tests/clients/cmdline/revert_tests.py	(working copy)
@@ -181,12 +181,14 @@
     svntest.actions.run_and_verify_svn(None, [], [], 
                                       'status', '-v', iota_path_moved)
     
-       
+
+
+
 #----------------------------------------------------------------------
+# Core implementation of revert_wc_to_wc_replace_with_props and
+# revert_wc_to_wc_replace_with_props
 
-def revert_replace_with_history_with_props(sbox):
-  "revert 'svn cp PATH PATH' replace with props"
-
+def revert_replacement_with_props(sbox, wc_copy):
   sbox.build()
   wc_dir = sbox.wc_dir
 
@@ -236,8 +238,13 @@
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # The copy shouldn't fail
+  if wc_copy:
+    pi_src = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
+  else:
+    pi_src = svntest.main.current_repo_url + '/A/D/G/pi'
+
   svntest.actions.run_and_verify_svn("", None, [],
-                                     'cp', pi_path, rho_path)
+                                     'cp', pi_src, rho_path)
 
   # Verify both content and props have been copied
   expected_disk.tweak('A/D/G/rho',
@@ -365,6 +372,17 @@
   svntest.tree.compare_trees(actual_disk, expected_disk.old_tree())
 
 
+def revert_wc_to_wc_replace_with_props(sbox):
+  "revert svn cp PATH PATH replace file with props"
+
+  revert_replacement_with_props(sbox, True)
+
+def revert_repos_to_wc_replace_with_props(sbox):
+  "revert svn cp URL PATH replace file with props"
+
+  revert_replacement_with_props(sbox, False)
+
+
 ########################################################################
 # Run the tests
 
@@ -374,8 +392,9 @@
               XFail(revert_reexpand_keyword),
               revert_replaced_file_without_props,
               XFail(revert_moved_file),
-              revert_replace_with_history_with_props,
-              XFail(revert_file_merge_replace_with_history)
+              revert_wc_to_wc_replace_with_props,
+              XFail(revert_file_merge_replace_with_history),
+              revert_repos_to_wc_replace_with_props,
              ]
 
 if __name__ == '__main__':
