I understand the desire to get the buildbots green again, and I'm
sorry these revisions which I committed broke the bots, but a little
patience might have been useful here. We have a long tradition of
allowing folks to attempt to fix problems, rather than reverting their
commits without consultation. I kinda wish you'd have given me
another 12 hours to attempt to fix it, rather than reverting.
-Hyrum
On Tue, May 17, 2011 at 10:40 PM, <rhuijben_at_apache.org> wrote:
> Author: rhuijben
> Date: Tue May 17 22:40:07 2011
> New Revision: 1104610
>
> URL: http://svn.apache.org/viewvc?rev=1104610&view=rev
> Log:
> Temporarily revert r1104383 (and to resolve conflicts also r1104400) as
> these revisions cause some very hard to diagnose problems in the property
> handling, which breaks on all buildbots.
>
> * libsvn_wc/props.c
> * libsvn_wc/wc_db.c
> * libsvn_wc/wc_db.h
> svn merge -c -1104400,-1104383 ^/subversion/trunk
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/props.c
> subversion/trunk/subversion/libsvn_wc/wc_db.c
> subversion/trunk/subversion/libsvn_wc/wc_db.h
>
> Modified: subversion/trunk/subversion/libsvn_wc/props.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=1104610&r1=1104609&r2=1104610&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/props.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/props.c Tue May 17 22:40:07 2011
> @@ -1665,34 +1665,6 @@ svn_wc_prop_list2(apr_hash_t **props,
> scratch_pool));
> }
>
> -struct propname_filter_baton_t {
> - svn_wc__proplist_receiver_t receiver_func;
> - void *receiver_baton;
> - const char *propname;
> -};
> -
> -static svn_error_t *
> -propname_filter_receiver(void *baton,
> - const char *local_abspath,
> - apr_hash_t *props,
> - apr_pool_t *scratch_pool)
> -{
> - struct propname_filter_baton_t *pfb = baton;
> - const svn_string_t *propval = apr_hash_get(props, pfb->propname,
> - APR_HASH_KEY_STRING);
> -
> - if (propval)
> - {
> - props = apr_hash_make(scratch_pool);
> - apr_hash_set(props, pfb->propname, APR_HASH_KEY_STRING, propval);
> -
> - SVN_ERR(pfb->receiver_func(pfb->receiver_baton, local_abspath, props,
> - scratch_pool));
> - }
> -
> - return SVN_NO_ERROR;
> -}
> -
> svn_error_t *
> svn_wc__prop_list_recursive(svn_wc_context_t *wc_ctx,
> const char *local_abspath,
> @@ -1706,23 +1678,40 @@ svn_wc__prop_list_recursive(svn_wc_conte
> void *cancel_baton,
> apr_pool_t *scratch_pool)
> {
> - svn_wc__proplist_receiver_t receiver = receiver_func;
> - void *baton = receiver_baton;
> -
> - struct propname_filter_baton_t pfb = { receiver_func, receiver_baton,
> - propname };
> -
> - if (propname)
> + switch (depth)
> {
> - baton = &pfb;
> - receiver = propname_filter_receiver;
> + case svn_depth_empty:
> + {
> + apr_hash_t *props;
> +
> + if (pristine)
> + SVN_ERR(svn_wc__db_read_pristine_props(&props, wc_ctx->db,
> + local_abspath,
> + scratch_pool, scratch_pool));
> + else
> + SVN_ERR(svn_wc__db_read_props(&props, wc_ctx->db, local_abspath,
> + scratch_pool, scratch_pool));
> +
> + if (receiver_func && props && apr_hash_count(props) > 0)
> + SVN_ERR((*receiver_func)(receiver_baton, local_abspath, props,
> + scratch_pool));
> + }
> + break;
> + case svn_depth_files:
> + case svn_depth_immediates:
> + case svn_depth_infinity:
> + SVN_ERR(svn_wc__db_read_props_streamily(wc_ctx->db, local_abspath,
> + propname, depth,
> + base_props, pristine,
> + receiver_func, receiver_baton,
> + cancel_func, cancel_baton,
> + scratch_pool));
> + break;
> + default:
> + SVN_ERR_MALFUNCTION();
> }
>
> - return svn_wc__db_read_props_streamily(wc_ctx->db, local_abspath, depth,
> - base_props, pristine,
> - receiver, baton,
> - cancel_func, cancel_baton,
> - scratch_pool);
> + return SVN_NO_ERROR;
> }
>
> svn_error_t *
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1104610&r1=1104609&r2=1104610&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Tue May 17 22:40:07 2011
> @@ -7629,6 +7629,7 @@ cache_props_recursive(void *cb_baton,
> svn_error_t *
> svn_wc__db_read_props_streamily(svn_wc__db_t *db,
> const char *local_abspath,
> + const char *propname,
> svn_depth_t depth,
> svn_boolean_t base_props,
> svn_boolean_t pristine,
> @@ -7647,6 +7648,9 @@ svn_wc__db_read_props_streamily(svn_wc__
>
> SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
> SVN_ERR_ASSERT(receiver_func);
> + SVN_ERR_ASSERT((depth == svn_depth_files) ||
> + (depth == svn_depth_immediates) ||
> + (depth == svn_depth_infinity));
>
> SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
> db, local_abspath,
> @@ -7692,8 +7696,25 @@ svn_wc__db_read_props_streamily(svn_wc__
> child_abspath = svn_dirent_join(wcroot->abspath,
> child_relpath, iterpool);
>
> - SVN_ERR(receiver_func(receiver_baton, child_abspath, props,
> - iterpool));
> + /* Filter on the propname, if given one. */
> + if (propname)
> + {
> + svn_string_t *propval = apr_hash_get(props, propname,
> + APR_HASH_KEY_STRING);
> +
> + if (propval)
> + {
> + props = apr_hash_make(iterpool);
> + apr_hash_set(props, propname, APR_HASH_KEY_STRING,
> + propval);
> + }
> + else
> + props = NULL;
> + }
> +
> + if (props)
> + SVN_ERR(receiver_func(receiver_baton, child_abspath, props,
> + iterpool));
> }
>
> SVN_ERR(svn_sqlite__step(&have_row, stmt));
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1104610&r1=1104609&r2=1104610&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.h Tue May 17 22:40:07 2011
> @@ -2017,10 +2017,14 @@ svn_wc__db_read_props(apr_hash_t **props
> *
> * If BASE_PROPS is FALSE and, PRISTINE is TRUE, the local modifications will
> * be suppressed. If PRISTINE is FALSE, local modifications will be visible.
> + *
> + * NOTE: The only valid values for DEPTH are svn_depth_files,
> + * svn_depth_immediates, and svn_depth_infinity.
> */
> svn_error_t *
> svn_wc__db_read_props_streamily(svn_wc__db_t *db,
> const char *local_abspath,
> + const char *propname,
> svn_depth_t depth,
> svn_boolean_t base_props,
> svn_boolean_t pristine,
>
>
>
Received on 2011-05-18 01:11:44 CEST