You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2012/08/24 14:51:14 UTC

svn commit: r1376898 - in /subversion/branches/inheritable-props/subversion: include/private/svn_wc_private.h libsvn_client/prop_commands.c libsvn_wc/props.c

Author: pburba
Date: Fri Aug 24 12:51:13 2012
New Revision: 1376898

URL: http://svn.apache.org/viewvc?rev=1376898&view=rev
Log:
On the inheritable-props branch: Stop contacting the repository for iprops
if none are found cached on a WC root.  If none are found we assume there
are none.  Since r1371831 we can't end up with an incomplete DB where a node
has been updated in all ways except for its iprops.

* subversion/include/private/svn_wc_private.h

  (svn_wc__get_iprops): Remove the output argument communicating if inherited
   properties were found; no callers use this anymore.

* subversion/libsvn_client/prop_commands.c

  (svn_client_propget5): Update call to svn_wc__get_iprops.

* subversion/libsvn_wc/props.c

  (svn_client_proplist4): Update call svn_wc__get_iprops.

Modified:
    subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h
    subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c
    subversion/branches/inheritable-props/subversion/libsvn_wc/props.c

Modified: subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h?rev=1376898&r1=1376897&r2=1376898&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/inheritable-props/subversion/include/private/svn_wc_private.h Fri Aug 24 12:51:13 2012
@@ -891,17 +891,13 @@ svn_wc__prop_list_recursive(svn_wc_conte
  * inherited by @a local_abspath from the ACTUAL tree above
  * @a local_abspath (looking through to the WORKING or BASE tree as
  * required), up to and including the root of the working copy and
- * any cached inherited properties inherited by the root.  If any
- * cached inherited properties are found or a working copy parent
- * representing the repository root is reached, then set
- * @a *cached_iprops_found to TRUE, set it to FALSE otherwise.
+ * any cached inherited properties inherited by the root.
  *
  * Allocate @a *inherited_props in @a result_pool.  Use @a scratch_pool
  * for temporary allocations.
  */
 svn_error_t *
 svn_wc__get_iprops(apr_array_header_t **inherited_props,
-                   svn_boolean_t *cached_iprops_found,
                    svn_wc_context_t *wc_ctx,
                    const char *local_abspath,
                    const char *propname,

Modified: subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c?rev=1376898&r1=1376897&r2=1376898&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_client/prop_commands.c Fri Aug 24 12:51:13 2012
@@ -912,13 +912,9 @@ svn_client_propget5(apr_hash_t **props,
         return svn_error_trace(err);
 
       if (inherited_props && local_iprops)
-        {
-          svn_boolean_t cached_iprops_found;
-
-          SVN_ERR(svn_wc__get_iprops(inherited_props, &cached_iprops_found,
-                                     ctx->wc_ctx, target, propname,
-                                     scratch_pool, scratch_pool));
-        }
+        SVN_ERR(svn_wc__get_iprops(inherited_props, ctx->wc_ctx,
+                                   target, propname,
+                                   scratch_pool, scratch_pool));
 
       SVN_ERR(get_prop_from_wc(props, propname, target,
                                pristine, kind,
@@ -1348,43 +1344,9 @@ svn_client_proplist4(const char *path_or
       if (get_target_inherited_props && local_iprops)
         {
           apr_array_header_t *iprops;
-          svn_boolean_t cached_iprops_found;
 
-          SVN_ERR(svn_wc__get_iprops(&iprops, &cached_iprops_found,
-                                     ctx->wc_ctx, local_abspath,
+          SVN_ERR(svn_wc__get_iprops(&iprops, ctx->wc_ctx, local_abspath,
                                      NULL, scratch_pool, scratch_pool));
-
-          /* If the cached inherited properties were not found, then ask the
-             repository for them. */
-          if (!cached_iprops_found)
-            {
-              svn_ra_session_t *ra_session;
-              svn_node_kind_t kind;
-              svn_client__pathrev_t *pathrev;
-              apr_array_header_t *remote_iprops;
-              int i;
-
-              /* Get an RA session for this URL. */
-              SVN_ERR(svn_client__ra_session_from_path2(&ra_session,
-                                                        &pathrev,
-                                                        path_or_url,
-                                                        NULL, peg_revision,
-                                                        revision, ctx,
-                                                        scratch_pool));
-
-              SVN_ERR(svn_ra_check_path(ra_session, "", pathrev->rev, &kind,
-                                        scratch_pool));
-              SVN_ERR(svn_ra_get_inherited_props(ra_session, &remote_iprops,
-                                                 "", pathrev->rev,
-                                                 result_pool));
-              for (i = remote_iprops->nelts - 1; i >= 0; i--)
-                {
-                  svn_prop_inherited_item_t *remote_iprop =
-                    APR_ARRAY_IDX(remote_iprops, i, svn_prop_inherited_item_t *);
-                  svn_sort__array_insert(&remote_iprop, iprops, 0);
-                }
-            }
-
           SVN_ERR(call_receiver(path_or_url, NULL, iprops, receiver,
                                 receiver_baton, scratch_pool));
         }

Modified: subversion/branches/inheritable-props/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/inheritable-props/subversion/libsvn_wc/props.c?rev=1376898&r1=1376897&r2=1376898&view=diff
==============================================================================
--- subversion/branches/inheritable-props/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/inheritable-props/subversion/libsvn_wc/props.c Fri Aug 24 12:51:13 2012
@@ -2357,7 +2357,6 @@ filter_unwanted_props(apr_hash_t *prop_h
 
 svn_error_t *
 svn_wc__get_iprops(apr_array_header_t **inherited_props,
-                   svn_boolean_t *cached_iprops_found,
                    svn_wc_context_t *wc_ctx,
                    const char *local_abspath,
                    const char *propname,
@@ -2374,9 +2373,6 @@ svn_wc__get_iprops(apr_array_header_t **
   *inherited_props = apr_array_make(result_pool, 1,
                                     sizeof(svn_prop_inherited_item_t *));
 
-  /* Our starting assumption. */
-  *cached_iprops_found = FALSE;
-
   /* Walk up to the root of the WC looking for inherited properties.  When we
      reach the WC root also check for cached inherited properties. */
   while (TRUE)
@@ -2396,14 +2392,8 @@ svn_wc__get_iprops(apr_array_header_t **
                                                  iterpool, iterpool));
 
           /* If the WC root is also the root of the repository then by
-             definition there are no inheritable properties to be had,
-             but we still consider the question "did we definitively find
-             any iprops to be found?" answered in the affirmative. */
-          if (child_repos_relpath[0] == '\0')
-            {
-              *cached_iprops_found = TRUE;
-            }
-          else
+             definition there are no inheritable properties to be had. */
+          if (child_repos_relpath[0] != '\0')
             {
               /* Grab the cached inherited properties for the WC root. */
               SVN_ERR(svn_wc__db_read_cached_iprops(&cached_iprops,
@@ -2411,10 +2401,6 @@ svn_wc__get_iprops(apr_array_header_t **
                                                     parent_abspath,
                                                     scratch_pool,
                                                     iterpool));
-              if (cached_iprops)
-                {
-                  *cached_iprops_found = TRUE;
-                }          
             }
         }