Index: subversion/libsvn_wc/adm_files.c
===================================================================
--- subversion/libsvn_wc/adm_files.c	(revision 16075)
+++ subversion/libsvn_wc/adm_files.c	(working copy)
@@ -289,13 +289,20 @@
                                NULL);
 }
 
+/* Kind for prop_path_internal. */
+typedef enum prop_path_kind_t
+{
+  prop_path_kind_base = 0,
+  prop_path_kind_revert,
+  prop_path_kind_wcprop,
+  prop_path_kind_working
+} prop_path_kind_t;
 
 static svn_error_t *
 prop_path_internal (const char **prop_path,
                     const char *path,
                     svn_wc_adm_access_t *adm_access,
-                    svn_boolean_t base,
-                    svn_boolean_t wcprop,
+                    prop_path_kind_t path_kind,
                     svn_boolean_t tmp,
                     apr_pool_t *pool)
 {
@@ -306,25 +313,44 @@
 
   if (entry && entry->kind == svn_node_dir)  /* It's a working copy dir */
     {
+      static const char * names[] = {
+        SVN_WC__ADM_DIR_PROP_BASE,    /* prop_path_kind_base */
+        SVN_WC__ADM_DIR_PROP_REVERT,  /* prop_path_kind_revert */
+        SVN_WC__ADM_DIR_WCPROPS,      /* prop_path_kind_wcprop */
+        SVN_WC__ADM_DIR_PROPS         /* prop_path_kind_working */
+      };
+
       *prop_path = extend_with_adm_name
         (path,
          NULL,
          tmp,
          pool,
-         base ? SVN_WC__ADM_DIR_PROP_BASE
-         : (wcprop ? SVN_WC__ADM_DIR_WCPROPS : SVN_WC__ADM_DIR_PROPS),
+         names[path_kind],
          NULL);
     }
   else  /* It's either a file, or a non-wc dir (i.e., maybe an ex-file) */
     {
+      static const char * extensions[] = {
+        SVN_WC__BASE_EXT,     /* prop_path_kind_base */
+        SVN_WC__REVERT_EXT,   /* prop_path_kind_revert */
+        SVN_WC__WORK_EXT,     /* prop_path_kind_wcprop */
+        SVN_WC__WORK_EXT      /* prop_path_kind_working */
+      };
+
+      static const char * dirs[] = {
+        SVN_WC__ADM_PROP_BASE,  /* prop_path_kind_base */
+        SVN_WC__ADM_PROP_BASE,  /* prop_path_kind_revert */
+        SVN_WC__ADM_WCPROPS,    /* prop_path_kind_wcprop */
+        SVN_WC__ADM_PROPS       /* prop_path_kind_working */
+      };
+
       svn_path_split (path, prop_path, &entry_name, pool);
       *prop_path = extend_with_adm_name
         (*prop_path,
-         base ? SVN_WC__BASE_EXT : SVN_WC__WORK_EXT,
+         extensions[path_kind],
          tmp,
          pool,
-         base ? SVN_WC__ADM_PROP_BASE
-         : (wcprop ? SVN_WC__ADM_WCPROPS : SVN_WC__ADM_PROPS),
+         dirs[path_kind],
          entry_name,
          NULL);
     }
@@ -342,8 +368,8 @@
                      svn_boolean_t tmp,
                      apr_pool_t *pool)
 {
-  return prop_path_internal (wcprop_path, path, adm_access, FALSE, TRUE, tmp,
-                             pool);
+  return prop_path_internal (wcprop_path, path, adm_access,
+                             prop_path_kind_wcprop, tmp, pool);
 }
 
 
@@ -356,8 +382,8 @@
                    svn_boolean_t tmp,
                    apr_pool_t *pool)
 {
-  return prop_path_internal (prop_path, path, adm_access, FALSE, FALSE, tmp,
-                             pool);
+  return prop_path_internal (prop_path, path, adm_access,
+                             prop_path_kind_working, tmp, pool);
 }
 
 
@@ -368,11 +394,21 @@
                         svn_boolean_t tmp,
                         apr_pool_t *pool)
 {
-  return prop_path_internal (prop_path, path, adm_access, TRUE, FALSE, tmp,
-                             pool);
+  return prop_path_internal (prop_path, path, adm_access, 
+                             prop_path_kind_base, tmp, pool);
 }
 
 
+svn_error_t *
+svn_wc__prop_revert_path (const char **prop_path,
+                          const char *path,
+                          svn_wc_adm_access_t *adm_access,
+                          svn_boolean_t tmp,
+                          apr_pool_t *pool)
+{
+  return prop_path_internal (prop_path, path, adm_access,
+                             prop_path_kind_revert, tmp, pool);
+}
 
 
 /*** Opening and closing files in the adm area. ***/
Index: subversion/libsvn_wc/adm_files.h
===================================================================
--- subversion/libsvn_wc/adm_files.h	(revision 16075)
+++ subversion/libsvn_wc/adm_files.h	(working copy)
@@ -112,6 +112,17 @@
                                      apr_pool_t *pool);
 
 
+/* Set *PROP_PATH to PATH's revert properties file.
+   If TMP is set, return a path to the tmp working property file. 
+   PATH can be a directory or file, and even have changed w.r.t. the
+   working copy's adm knowledge. ADM_ACCESS is an access baton set
+   that contains PATH. */
+svn_error_t *svn_wc__prop_revert_path (const char **prop_path,
+                                       const char *path,
+                                       svn_wc_adm_access_t *adm_access,
+                                       svn_boolean_t tmp,
+                                       apr_pool_t *pool);
+
 
 /*** Opening all kinds of adm files ***/
 
Index: subversion/libsvn_wc/adm_ops.c
===================================================================
--- subversion/libsvn_wc/adm_ops.c	(revision 16075)
+++ subversion/libsvn_wc/adm_ops.c	(working copy)
@@ -168,8 +168,39 @@
   return SVN_NO_ERROR;
 }
 
+/* Helper for svn_wc_process_committed2. */
+static svn_error_t *
+remove_revert_file(svn_stringbuf_t **logtags,
+                   svn_wc_adm_access_t *adm_access,
+                   const char *base_name,
+                   svn_boolean_t is_prop,
+                   apr_pool_t * pool)
+{
+  const char * revert_file;
+  svn_node_kind_t kind;
+  
+  if (is_prop)
+    SVN_ERR (svn_wc__prop_revert_path (&revert_file, base_name, adm_access,
+                                       FALSE, pool));
+  else
+    revert_file = svn_wc__text_revert_path (base_name, FALSE, pool);
 
+  SVN_ERR (svn_io_check_path
+            (svn_path_join (svn_wc_adm_access_path (adm_access),
+                            revert_file, pool),
+            &kind, pool));
 
+  if (kind == svn_node_file)
+    {
+      svn_xml_make_open_tag (logtags, pool, svn_xml_self_closing,
+                             SVN_WC__LOG_RM,
+                             SVN_WC__LOG_ATTR_NAME, revert_file,
+                             NULL);
+    }
+  
+  return SVN_NO_ERROR;
+}
+
 svn_error_t *
 svn_wc__do_update_cleanup (const char *path,
                            svn_wc_adm_access_t *adm_access,
@@ -312,26 +343,16 @@
   if (base_name)
     {
       /* PATH must be some sort of file */
-      const char *latest_base,*revert_file;
+      const char *latest_base;
       svn_node_kind_t kind;
 
-      /* If the revert file exists it needs to be deleted when the file
-       * is committed. */
-      revert_file = svn_wc__text_revert_path (base_name, FALSE, pool);
+      /* If the props or text revert file exists it needs to be deleted when
+       * the file is committed. */
+      SVN_ERR (remove_revert_file (&logtags, adm_access, base_name,
+                                   FALSE, pool));
+      SVN_ERR (remove_revert_file (&logtags, adm_access, base_name,
+                                   TRUE, pool));
 
-      SVN_ERR (svn_io_check_path
-               (svn_path_join (svn_wc_adm_access_path (adm_access),
-                               revert_file, pool),
-                &kind, pool));
-
-      if (kind == svn_node_file)
-        {
-          svn_xml_make_open_tag (&logtags, pool, svn_xml_self_closing,
-                                 SVN_WC__LOG_RM,
-                                 SVN_WC__LOG_ATTR_NAME, revert_file,
-                                 NULL);
-        }
-      
       /* There may be a new text base is sitting in the adm tmp area by
          now, because the commit succeeded.  A file that is copied, but not
          otherwise modified, doesn't have a new text base, so we use
@@ -1309,7 +1330,27 @@
   fullpath = svn_wc_adm_access_path (adm_access);
   if (name && (strcmp (name, SVN_WC_ENTRY_THIS_DIR) != 0))
     fullpath = svn_path_join (fullpath, name, pool);
+  
+  /* Look for a revert base file. If it exists use it for
+   * the prop base for the file.  If it doesn't use the normal
+   * prop base. */
+  {
+    svn_node_kind_t disk_kind;
+    const char *bprop, *rprop;
 
+    SVN_ERR (svn_wc__prop_base_path (&bprop, fullpath,
+                                     adm_access, FALSE, pool));
+
+    SVN_ERR (svn_wc__prop_revert_path (&rprop, fullpath,
+                                       adm_access, FALSE, pool));
+
+    SVN_ERR (svn_io_check_path (rprop, &disk_kind, pool));
+    if (disk_kind == svn_node_file)
+      {
+        SVN_ERR (svn_io_file_rename (rprop, bprop, pool));
+      }          
+  }
+
   /* Check for prop changes. */
   SVN_ERR (svn_wc_props_modified_p (&modified_p, fullpath, adm_access, pool));  
   if (modified_p)
Index: subversion/libsvn_wc/copy.c
===================================================================
--- subversion/libsvn_wc/copy.c	(revision 16075)
+++ subversion/libsvn_wc/copy.c	(working copy)
@@ -123,7 +123,7 @@
      - dst_parent points to a dir under version control, in the same
                   working copy.
      - dst_basename will be the 'new' name of the copied file in dst_parent
- */
+   */
 static svn_error_t *
 copy_file_administratively (const char *src_path, 
                             svn_wc_adm_access_t *src_access,
@@ -137,11 +137,26 @@
   const svn_wc_entry_t *src_entry, *dst_entry;
   svn_boolean_t special;
   svn_boolean_t replace = FALSE;
+  const char *src_wprop, *src_bprop, *dst_wprop, *dst_bprop;
 
   /* The 'dst_path' is simply dst_parent/dst_basename */
   const char *dst_path
     = svn_path_join (svn_wc_adm_access_path (dst_parent), dst_basename, pool);
 
+  /* Discover the paths to the two text-base files */
+  const char *src_txtb = svn_wc__text_base_path (src_path, FALSE, pool);
+  const char *dst_txtb = svn_wc__text_base_path (dst_path, FALSE, pool);
+
+  /* Discover the paths to the four prop files */
+  SVN_ERR (svn_wc__prop_path (&src_wprop, src_path,
+                              src_access, FALSE, pool));
+  SVN_ERR (svn_wc__prop_base_path (&src_bprop, src_path,
+                                   src_access, FALSE, pool));
+  SVN_ERR (svn_wc__prop_path (&dst_wprop, dst_path,
+                              dst_parent, FALSE, pool));
+  SVN_ERR (svn_wc__prop_base_path (&dst_bprop, dst_path,
+                                    dst_parent, FALSE, pool));
+
   /* Sanity check:  if dst file exists already, don't allow overwrite. */
   SVN_ERR (svn_io_check_path (dst_path, &dst_kind, pool));
   if (dst_kind != svn_node_none)
@@ -197,14 +212,18 @@
                                             pool));
  
   /* If we're replacing the file then we need to save the destination files
-   * text base before replacing it (see comments below for why it gets
-   * replaced).  This allows us to revert the entire change. */
+   * text base and prop base before replacing it (see comments below for why
+   * it gets replaced).  This allows us to revert the entire change. */
   if (replace) 
     {
-      const char *src_txtb = svn_wc__text_base_path (dst_path, FALSE, pool);
-      const char *dst_rvrt = svn_wc__text_revert_path (dst_path, FALSE, pool);
+      const char *dst_rtext = svn_wc__text_revert_path (dst_path, FALSE, pool);
+      const char *dst_rprop;
 
-      SVN_ERR (svn_io_copy_file (src_txtb, dst_rvrt, TRUE, pool));
+      SVN_ERR (svn_wc__prop_revert_path (&dst_rprop, dst_path,
+                                         dst_parent, FALSE, pool));
+
+      SVN_ERR (svn_io_copy_file (dst_txtb, dst_rtext, TRUE, pool));
+      SVN_ERR (svn_io_copy_file (dst_bprop, dst_rprop, TRUE, pool));
     }
   
   /* Copy the pristine text-base over.  Why?  Because it's the *only*
@@ -223,22 +242,7 @@
      working and pristine propfiles over too. */
   {
     svn_node_kind_t kind;
-    const char *src_wprop, *src_bprop, *dst_wprop, *dst_bprop;
 
-    /* Discover the paths to the two text-base files */
-    const char *src_txtb = svn_wc__text_base_path (src_path, FALSE, pool);
-    const char *dst_txtb = svn_wc__text_base_path (dst_path, FALSE, pool);
-
-    /* Discover the paths to the four prop files */
-    SVN_ERR (svn_wc__prop_path (&src_wprop, src_path, 
-                                src_access, FALSE, pool));
-    SVN_ERR (svn_wc__prop_base_path (&src_bprop, src_path, 
-                                     src_access, FALSE, pool));
-    SVN_ERR (svn_wc__prop_path (&dst_wprop, dst_path, 
-                                dst_parent, FALSE, pool));
-    SVN_ERR (svn_wc__prop_base_path (&dst_bprop, dst_path, 
-                                     dst_parent, FALSE, pool));
-
     /* Copy the text-base over unconditionally. */
     SVN_ERR (svn_io_copy_file (src_txtb, dst_txtb, TRUE, pool));
 
Index: subversion/libsvn_wc/wc.h
===================================================================
--- subversion/libsvn_wc/wc.h	(revision 16075)
+++ subversion/libsvn_wc/wc.h	(working copy)
@@ -114,6 +114,7 @@
 #define SVN_WC__ADM_PROP_BASE           "prop-base"
 #define SVN_WC__ADM_DIR_PROPS           "dir-props"
 #define SVN_WC__ADM_DIR_PROP_BASE       "dir-prop-base"
+#define SVN_WC__ADM_DIR_PROP_REVERT     "dir-prop-revert"
 #define SVN_WC__ADM_WCPROPS             "wcprops"
 #define SVN_WC__ADM_DIR_WCPROPS         "dir-wcprops"
 #define SVN_WC__ADM_LOG                 "log"
Index: subversion/tests/clients/cmdline/revert_tests.py
===================================================================
--- subversion/tests/clients/cmdline/revert_tests.py	(revision 16075)
+++ subversion/tests/clients/cmdline/revert_tests.py	(working copy)
@@ -277,7 +277,7 @@
               XFail(revert_reexpand_keyword),
               revert_replaced_file_without_props,
               XFail(revert_moved_file),
-              XFail(revert_replace_with_history_with_props),
+              revert_replace_with_history_with_props,
              ]
 
 if __name__ == '__main__':
