You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/04/20 02:34:50 UTC

svn commit: r935776 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/copy.c libsvn_wc/diff.c libsvn_wc/props.c libsvn_wc/props.h libsvn_wc/update_editor.c libsvn_wc/workqueue.c

Author: gstein
Date: Tue Apr 20 00:34:49 2010
New Revision: 935776

URL: http://svn.apache.org/viewvc?rev=935776&view=rev
Log:
Create two internal prop APIs that more directly model our tree approach
and the intended/eventual wc_db APIs. Replace svn_wc__load_props() with
these APIs.

Also convert uses of __internal_prop_diff to __get_pristine_props where
only the props were fetched (without the changes).

The code in diff.c:file_diff() is unclear and may be slightly incorrect
(though the test pass) in this revision. The next revision will clear up
the logic and streamline status checks.

* subversion/libsvn_wc/props.h:
  (svn_wc__load_props): removed
  (svn_wc__get_pristine_props): internal version of svn_wc_get_pristine_props
  (svn_wc__get_actual_props): internal version of svn_wc_proplist2

* subversion/libsvn_wc/props.c:
  (svn_wc__load_props): made static and renamed to...
  (load_all_props): ... this.
  (svn_wc__merge_props, svn_wc__internal_propset, svn_wc__has_props,
      svn_wc__internal_propdiff): track rename to load_all_props
  (svn_wc__get_actual_props): new internal function to load the ACTUAL
    properties, using load_all_props
  (svn_wc_prop_list2, svn_wc__internal_propget): switch to use
    svn_wc__get_actual_props
  (svn_wc__get_pristine_props): new internal function to load the pristine
    props from BASE or WORKING as appropriate. fill in all the correct
    checks and return NULL when props are undefined.
  (svn_wc_get_pristine_props): use svn_wc__get_pristine_props
  (svn_wc__internal_propget): 

* subversion/libsvn_wc/copy.c:
  (copy_props): switch to use svn_wc__get_actual_props
  (copy_file_administratively): switch to use svn_wc__get_pristine_props
    and svn_wc__get_actual_props

* subversion/libsvn_wc/diff.c:
  (get_base_mimetype): simplify fetching of props and use
    svn_wc__get_pristine_props.
  (get_working_mimetype): simplify fetching of props and use
    svn_wc__get_actual_props
  (file_diff): switch from __internal_propdiff to get_pristine_props. be
    careful around fetching the baseprops, depending on the REPLACED and
    IGNORE_ANCESTRY values. we may need the "revert" props
  (report_wc_directory_as_added, close_directory, close_file): switch to
    get_pristine_props and get_actual_props

* subversion/libsvn_wc/update_editor.c:
  (close_directory, add_file_with_history): use svn_wc__get_pristine_props
    and __get_actual_props

* subversion/libsvn_wc/workqueue.c:
  (svn_wc__wq_add_revert): use svn_wc__get_(pristine|actual)_props

Modified:
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_wc/copy.c
    subversion/trunk/subversion/libsvn_wc/diff.c
    subversion/trunk/subversion/libsvn_wc/props.c
    subversion/trunk/subversion/libsvn_wc/props.h
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/libsvn_wc/workqueue.c

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=935776&r1=935775&r2=935776&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Tue Apr 20 00:34:49 2010
@@ -5689,8 +5689,12 @@ svn_wc_prop_list(apr_hash_t **props,
 
 /** Return the set of "pristine" properties for @a local_abspath.
  *
+ * There are node states where properties do not make sense. For these
+ * cases, NULL will be returned in @a *props. Otherwise, a hash table
+ * will always be returned (but may be empty, indicating no properties).
+ *
  * If the node is locally-added, then @a *props will be set to NULL since
- * there are no pristine properties. Note: if this addition is replacing a
+ * pristine properties are undefined. Note: if this addition is replacing a
  * previously-deleted node, then the replaced node's properties are not
  * available until the addition is reverted.
  *
@@ -5706,6 +5710,13 @@ svn_wc_prop_list(apr_hash_t **props,
  * Nodes that are incomplete, excluded, absent, or not present at the
  * node's revision will return NULL in @props.
  *
+ * If the node is not versioned, SVN_ERR_WC_PATH_NOT_FOUND will be returned.
+ *
+ * ### until we get to single-db: if the node has been marked for deletion,
+ * ### is a directory, and the directory is missing on disk, then the
+ * ### pristine properties will not be available; SVN_ERR_PROPERTY_NOT_FOUND
+ * ### will be returned.
+ *
  * @a props will be allocated in @a result_pool, and all temporary
  * allocations will be performed in @a scratch_pool.
  *

Modified: subversion/trunk/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/copy.c?rev=935776&r1=935775&r2=935776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/copy.c (original)
+++ subversion/trunk/subversion/libsvn_wc/copy.c Tue Apr 20 00:34:49 2010
@@ -56,8 +56,8 @@ copy_props(svn_wc__db_t *db,
   apr_hash_t *props;
   apr_hash_index_t *hi;
 
-  SVN_ERR(svn_wc__load_props(NULL, &props, db, src_abspath,
-                             scratch_pool, scratch_pool));
+  SVN_ERR(svn_wc__get_actual_props(&props, db, src_abspath,
+                                   scratch_pool, scratch_pool));
   for (hi = apr_hash_first(scratch_pool, props); hi; hi = apr_hash_next(hi))
     {
       const char *propname = svn__apr_hash_index_key(hi);
@@ -444,8 +444,10 @@ copy_file_administratively(svn_wc_contex
       }
 
     /* Load source base and working props. */
-    SVN_ERR(svn_wc__load_props(&base_props, &props, db,
-                               src_abspath, scratch_pool, scratch_pool));
+    SVN_ERR(svn_wc__get_pristine_props(&base_props, db, src_abspath,
+                                       scratch_pool, scratch_pool));
+    SVN_ERR(svn_wc__get_actual_props(&props, db, src_abspath,
+                                     scratch_pool, scratch_pool));
 
     /* Copy working copy file to temporary location */
     {

Modified: subversion/trunk/subversion/libsvn_wc/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/diff.c?rev=935776&r1=935775&r2=935776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/diff.c (original)
+++ subversion/trunk/subversion/libsvn_wc/diff.c Tue Apr 20 00:34:49 2010
@@ -460,16 +460,15 @@ get_base_mimetype(const char **mimetype,
                   apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool)
 {
-  apr_hash_t *props = NULL;
+  apr_hash_t *props;
 
-  if (baseprops == NULL)
-    baseprops = &props;
+  SVN_ERR(svn_wc__get_pristine_props(&props, db, local_abspath,
+                                     result_pool, scratch_pool));
 
-  if (*baseprops == NULL)
-    SVN_ERR(svn_wc__internal_propdiff(NULL, baseprops, db, local_abspath,
-                                      result_pool, scratch_pool));
+  if (baseprops != NULL)
+    *baseprops = props;
 
-  *mimetype = get_prop_mimetype(*baseprops);
+  *mimetype = get_prop_mimetype(props);
 
   return SVN_NO_ERROR;
 }
@@ -490,16 +489,15 @@ get_working_mimetype(const char **mimety
                      apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool)
 {
-  apr_hash_t *props = NULL;
+  apr_hash_t *props;
 
-  if (workingprops == NULL)
-    workingprops = &props;
+  SVN_ERR(svn_wc__get_actual_props(&props, db, local_abspath,
+                                   result_pool, scratch_pool));
 
-  if (*workingprops == NULL)
-    SVN_ERR(svn_wc__load_props(NULL, workingprops, db, local_abspath,
-                               result_pool, scratch_pool));
+  if (workingprops != NULL)
+    *workingprops = props;
 
-  *mimetype = get_prop_mimetype(*workingprops);
+  *mimetype = get_prop_mimetype(props);
 
   return SVN_NO_ERROR;
 }
@@ -640,8 +638,8 @@ file_diff(struct dir_baton *db,
     }
   else
     {
-      SVN_ERR(svn_wc__internal_propdiff(NULL, &baseprops, eb->db,
-                                        local_abspath, pool, pool));
+      SVN_ERR(svn_wc__get_pristine_props(&baseprops, eb->db,
+                                         local_abspath, pool, pool));
     }
 
   SVN_ERR(svn_wc__internal_is_replaced(&replaced, eb->db, local_abspath,
@@ -740,8 +738,28 @@ file_diff(struct dir_baton *db,
           const char *working_mimetype;
 
           /* Get svn:mime-type for both base and working file. */
-          SVN_ERR(get_base_mimetype(&base_mimetype, &baseprops, eb->db,
-                                    local_abspath, pool, pool));
+          if (replaced
+              && eb->ignore_ancestry)
+            {
+              /* We don't want the normal pristine properties (which are
+                 from the WORKING tree). We want the pristines associated
+                 with the BASE tree, which are saved as "revert" props.  */
+              SVN_ERR(svn_wc__load_revert_props(&baseprops,
+                                                eb->db, local_abspath,
+                                                pool, pool));
+              base_mimetype = get_prop_mimetype(baseprops);
+            }
+          else
+            {
+              /* We can only fetch the BASE props if the node has not
+                 been replaced, or it was copied/moved here.  */
+              SVN_ERR_ASSERT(!replaced
+                             || status == svn_wc__db_status_copied
+                             || status == svn_wc__db_status_moved_here);
+
+              SVN_ERR(get_base_mimetype(&base_mimetype, &baseprops, eb->db,
+                                        local_abspath, pool, pool));
+            }
           SVN_ERR(get_working_mimetype(&working_mimetype, NULL, local_abspath,
                                        eb->db, pool, pool));
 
@@ -1049,11 +1067,11 @@ report_wc_directory_as_added(struct dir_
                                         eb->changelist_hash, pool))
     {
       if (eb->use_text_base)
-        SVN_ERR(svn_wc__internal_propdiff(NULL, &wcprops, eb->db, dir_abspath,
-                                          pool, pool));
+        SVN_ERR(svn_wc__get_pristine_props(&wcprops, eb->db, dir_abspath,
+                                           pool, pool));
       else
-        SVN_ERR(svn_wc__load_props(NULL, &wcprops, eb->db, dir_abspath,
-                                   pool, pool));
+        SVN_ERR(svn_wc__get_actual_props(&wcprops, eb->db, dir_abspath,
+                                         pool, pool));
 
       SVN_ERR(svn_prop_diffs(&propchanges, wcprops, emptyprops, pool));
 
@@ -1332,19 +1350,22 @@ close_directory(void *dir_baton,
         {
           if (db->eb->use_text_base)
             {
-              SVN_ERR(svn_wc__internal_propdiff(NULL, &originalprops, eb->db,
-                                                db->local_abspath, pool, pool));
+              SVN_ERR(svn_wc__get_pristine_props(&originalprops,
+                                                 eb->db, db->local_abspath,
+                                                 pool, pool));
             }
           else
             {
               apr_hash_t *base_props, *repos_props;
 
-              SVN_ERR(svn_wc__load_props(NULL, &originalprops,
-                                         eb->db, db->local_abspath, pool, pool));
+              SVN_ERR(svn_wc__get_actual_props(&originalprops,
+                                               eb->db, db->local_abspath,
+                                               pool, pool));
 
               /* Load the BASE and repository directory properties. */
-              SVN_ERR(svn_wc__internal_propdiff(NULL, &base_props, eb->db,
-                                                db->local_abspath, pool, pool));
+              SVN_ERR(svn_wc__get_pristine_props(&base_props,
+                                                 eb->db, db->local_abspath,
+                                                 pool, pool));
 
               repos_props = apply_propchanges(base_props, db->propchanges);
 
@@ -1575,8 +1596,8 @@ close_file(void *file_baton,
   if (fb->added)
     base_props = apr_hash_make(pool);
   else
-    SVN_ERR(svn_wc__internal_propdiff(NULL, &base_props, eb->db,
-                                      fb->local_abspath, pool, pool));
+    SVN_ERR(svn_wc__get_pristine_props(&base_props, eb->db,
+                                       fb->local_abspath, pool, pool));
 
   repos_props = apply_propchanges(base_props, fb->propchanges);
 
@@ -1669,8 +1690,9 @@ close_file(void *file_baton,
     }
   else
     {
-      SVN_ERR(svn_wc__load_props(NULL, &originalprops, eb->db,
-                                 fb->local_abspath, pool, pool));
+      SVN_ERR(svn_wc__get_actual_props(&originalprops,
+                                       eb->db, fb->local_abspath,
+                                       pool, pool));
 
       /* We have the repository properties in repos_props, and the
          WORKING properties in originalprops.  Recalculate

Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=935776&r1=935775&r2=935776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Tue Apr 20 00:34:49 2010
@@ -226,13 +226,13 @@ get_existing_prop_reject_file(const char
 
 
 /*** Loading regular properties. ***/
-svn_error_t *
-svn_wc__load_props(apr_hash_t **base_props_p,
-                   apr_hash_t **props_p,
-                   svn_wc__db_t *db,
-                   const char *local_abspath,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool)
+static svn_error_t *
+load_all_props(apr_hash_t **base_props_p,
+               apr_hash_t **props_p,
+               svn_wc__db_t *db,
+               const char *local_abspath,
+               apr_pool_t *result_pool,
+               apr_pool_t *scratch_pool)
 {
   apr_hash_t *base_props = NULL; /* Silence uninitialized warning. */
 
@@ -1561,10 +1561,10 @@ svn_wc__merge_props(svn_wc_notify_state_
         }
       else
         {
-          SVN_ERR(svn_wc__load_props(base_props ? NULL : &base_props,
-                                     working_props ? NULL : &working_props,
-                                     db, local_abspath,
-                                     result_pool, scratch_pool));
+          SVN_ERR(load_all_props(base_props ? NULL : &base_props,
+                                 working_props ? NULL : &working_props,
+                                 db, local_abspath,
+                                 result_pool, scratch_pool));
         }
     }
   if (!server_baseprops)
@@ -1786,6 +1786,23 @@ svn_wc__wcprop_set(svn_wc__db_t *db,
 
 /*** Public Functions ***/
 
+svn_error_t *
+svn_wc__get_actual_props(apr_hash_t **props,
+                         svn_wc__db_t *db,
+                         const char *local_abspath,
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool)
+{
+  SVN_ERR_ASSERT(props != NULL);
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+
+  /* ### perform some state checking. for example, locally-deleted nodes
+     ### should not have any ACTUAL props.  */
+
+  return svn_error_return(load_all_props(NULL, props, db, local_abspath,
+                                         result_pool, scratch_pool));
+}
+
 
 svn_error_t *
 svn_wc_prop_list2(apr_hash_t **props,
@@ -1794,11 +1811,70 @@ svn_wc_prop_list2(apr_hash_t **props,
                   apr_pool_t *result_pool,
                   apr_pool_t *scratch_pool)
 {
+  return svn_error_return(svn_wc__get_actual_props(props,
+                                                   wc_ctx->db,
+                                                   local_abspath,
+                                                   result_pool,
+                                                   scratch_pool));
+}
+
+
+svn_error_t *
+svn_wc__get_pristine_props(apr_hash_t **props,
+                           svn_wc__db_t *db,
+                           const char *local_abspath,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
+{
+  svn_wc__db_status_t status;
+
+  SVN_ERR_ASSERT(props != NULL);
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
-  return svn_error_return(
-    svn_wc__load_props(NULL, props, wc_ctx->db, local_abspath,
-                       result_pool, scratch_pool));
+  /* Certain node stats do not have properties defined on them. Check the
+     state, and return NULL for these situations.  */
+
+  SVN_ERR(svn_wc__db_read_info(&status, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                               NULL, NULL, NULL,
+                               db, local_abspath,
+                               scratch_pool, scratch_pool));
+  if (status == svn_wc__db_status_added)
+    {
+      SVN_ERR(svn_wc__db_scan_addition(&status, NULL,
+                                       NULL, NULL, NULL,
+                                       NULL, NULL, NULL, NULL,
+                                       db, local_abspath,
+                                       scratch_pool, scratch_pool));
+    }
+  if (status == svn_wc__db_status_added
+#if 0
+      /* ### the update editor needs to fetch properties while the directory
+         ### is still marked incomplete  */
+      || status == svn_wc__db_status_incomplete
+#endif
+      || status == svn_wc__db_status_excluded
+      || status == svn_wc__db_status_absent
+      || status == svn_wc__db_status_not_present
+      || status == svn_wc__db_status_obstructed
+      || status == svn_wc__db_status_obstructed_add)
+    {
+      *props = NULL;
+      return SVN_NO_ERROR;
+    }
+  if (status == svn_wc__db_status_obstructed_delete)
+    return svn_error_createf(SVN_ERR_PROPERTY_NOT_FOUND, NULL,
+                             /* ### temporary until single-db  */
+                             U_("Directory '%s' is missing on disk, so the "
+                                "properties are not available."),
+                             svn_dirent_local_style(local_abspath,
+                                                    scratch_pool));
+
+  /* status: normal, moved_here, copied, deleted  */
+
+  return svn_error_return(load_all_props(props, NULL, db, local_abspath,
+                                         result_pool, scratch_pool));
 }
 
 
@@ -1809,14 +1885,11 @@ svn_wc_get_pristine_props(apr_hash_t **p
                           apr_pool_t *result_pool,
                           apr_pool_t *scratch_pool)
 {
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-  /* ### we should check the node's status and ensure that we are getting
-     ### exactly the properties (or NULL) that the docstring states.  */
-
-  return svn_error_return(
-    svn_wc__load_props(props, NULL, wc_ctx->db, local_abspath,
-                       result_pool, scratch_pool));
+  return svn_error_return(svn_wc__get_pristine_props(props,
+                                                     wc_ctx->db,
+                                                     local_abspath,
+                                                     result_pool,
+                                                     scratch_pool));
 }
 
 
@@ -1898,8 +1971,8 @@ svn_wc__internal_propget(const svn_strin
   else
     {
       /* regular prop */
-      SVN_ERR_W(svn_wc__load_props(NULL, &prophash, db, local_abspath,
-                                   result_pool, scratch_pool),
+      SVN_ERR_W(svn_wc__get_actual_props(&prophash, db, local_abspath,
+                                         result_pool, scratch_pool),
                 _("Failed to load properties from disk"));
     }
 
@@ -2131,8 +2204,8 @@ svn_wc__internal_propset(svn_wc__db_t *d
       /* If not, we'll set the file to read-only at commit time. */
     }
 
-  SVN_ERR_W(svn_wc__load_props(&base_prophash, &prophash, db,
-                               local_abspath, scratch_pool, scratch_pool),
+  SVN_ERR_W(load_all_props(&base_prophash, &prophash, db,
+                           local_abspath, scratch_pool, scratch_pool),
             _("Failed to load properties from disk"));
 
   /* If we're changing this file's list of expanded keywords, then
@@ -2378,8 +2451,8 @@ svn_wc__has_props(svn_boolean_t *has_pro
   apr_hash_t *base_props;
   apr_hash_t *working_props;
 
-  SVN_ERR(svn_wc__load_props(&base_props, &working_props,
-                             db, local_abspath, scratch_pool, scratch_pool));
+  SVN_ERR(load_all_props(&base_props, &working_props,
+                         db, local_abspath, scratch_pool, scratch_pool));
   *has_props =
         ((apr_hash_count(base_props) + apr_hash_count(working_props)) > 0);
 
@@ -2471,8 +2544,8 @@ svn_wc__internal_propdiff(apr_array_head
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
-  SVN_ERR(svn_wc__load_props(&baseprops, propchanges ? &props : NULL,
-                             db, local_abspath, result_pool, scratch_pool));
+  SVN_ERR(load_all_props(&baseprops, propchanges ? &props : NULL,
+                         db, local_abspath, result_pool, scratch_pool));
 
   if (original_props != NULL)
     *original_props = baseprops;

Modified: subversion/trunk/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.h?rev=935776&r1=935775&r2=935776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.h (original)
+++ subversion/trunk/subversion/libsvn_wc/props.h Tue Apr 20 00:34:49 2010
@@ -185,18 +185,24 @@ svn_wc__working_props_committed(svn_wc__
                                 const char *local_abspath,
                                 apr_pool_t *scratch_pool);
 
-/* Load the base and working props for ENTRY at PATH returning
-   them in *BASE_PROPS_P and *PROPS_P respectively.
-   Any of BASE_PROPS and PROPS may be NULL.
-   Returned hashes/values are allocated in RESULT_POOL. All temporary
-   allocations are made in SCRATCH_POOL.  */
+
+/* Internal version of svn_wc_get_pristine_props.  */
+svn_error_t *
+svn_wc__get_pristine_props(apr_hash_t **props,
+                           svn_wc__db_t *db,
+                           const char *local_abspath,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool);
+
+
+/* Internal version of svn_wc_prop_list2.  */
 svn_error_t *
-svn_wc__load_props(apr_hash_t **base_props_p,
-                   apr_hash_t **props_p,
-                   svn_wc__db_t *db,
-                   const char *local_abspath,
-                   apr_pool_t *result_pool,
-                   apr_pool_t *scratch_pool);
+svn_wc__get_actual_props(apr_hash_t **props,
+                         svn_wc__db_t *db,
+                         const char *local_abspath,
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool);
+
 
 /* Load the revert props for ENTRY at PATH returning them in *REVERT_PROPS_P.
    Returned hash/values are allocated in RESULT_POOL. All temporary

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=935776&r1=935775&r2=935776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Apr 20 00:34:49 2010
@@ -2935,9 +2935,12 @@ close_directory(void *dir_baton,
         }
       else
         {
-          SVN_ERR(svn_wc__load_props(&base_props, &working_props,
-                                     eb->db, db->local_abspath,
-                                     pool, pool));
+          SVN_ERR(svn_wc__get_pristine_props(&base_props,
+                                             eb->db, db->local_abspath,
+                                             pool, pool));
+          SVN_ERR(svn_wc__get_actual_props(&working_props,
+                                           eb->db, db->local_abspath,
+                                           pool, pool));
         }
 
       /* In a copy of the BASE props, remove every property that we see an
@@ -3562,8 +3565,12 @@ add_file_with_history(const char *path,
            * This assert wants to verify that there are no such callers. */
           SVN_ERR_ASSERT(source_text_base != NULL);
           
-          SVN_ERR(svn_wc__load_props(&base_props, &working_props, db,
-                                     src_local_abspath, pool, subpool));
+          SVN_ERR(svn_wc__get_pristine_props(&base_props,
+                                             db, src_local_abspath,
+                                             pool, subpool));
+          SVN_ERR(svn_wc__get_actual_props(&working_props,
+                                           db, src_local_abspath,
+                                           pool, subpool));
         }
 
       SVN_ERR(svn_stream_copy3(source_text_base, copied_stream,

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=935776&r1=935775&r2=935776&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Tue Apr 20 00:34:49 2010
@@ -579,9 +579,12 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
       apr_hash_t *working_props;
       apr_array_header_t *prop_diffs;
 
-      SVN_ERR(svn_wc__load_props(&base_props, &working_props,
-                                 db, local_abspath,
-                                 scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__get_pristine_props(&base_props,
+                                         db, local_abspath,
+                                         scratch_pool, scratch_pool));
+      SVN_ERR(svn_wc__get_actual_props(&working_props,
+                                       db, local_abspath,
+                                       scratch_pool, scratch_pool));
       SVN_ERR(svn_prop_diffs(&prop_diffs, working_props, base_props,
                              scratch_pool));
       magic_changed = svn_wc__has_magic_property(prop_diffs);