pbu...@apache.org wrote on Wed, Mar 21, 2012 at 01:48:34 -0000:
> +/* Helper for svn_ra_get_file2 and svn_ra_get_dir3 when those APIs need to
> +   find PATH's inherited properties on a legacy server that doesn't have the
> +   SVN_RA_CAPABILITY_INHERITED_PROPS capability.
> +
> +   All arguments are as per the two aforementioned APIs. */
> +static svn_error_t*
> +get_inherited_props(svn_ra_session_t *session,
> +                    const char *path,
> +                    svn_revnum_t revision,
> +                    apr_array_header_t **inherited_props,
> +                    apr_pool_t *pool)
> +{
> +  /* Walk to the root of the repository getting inherited
> +     props for PATH. */
> +  SVN_ERR(svn_ra_get_repos_root2(session, &repos_root_url, subpool));
> +  SVN_ERR(svn_ra_get_session_url(session, &session_url, subpool));
> +  parent_url = session_url;
> +
> +  while (strcmp(repos_root_url, parent_url))
> +    {
> +      parent_url = svn_uri_dirname(parent_url, iterpool);
> +      SVN_ERR(svn_ra_reparent(session, parent_url, iterpool));

* danielsh wonders if an assert(parent_url.startswith(repos_root_url)) is in 
order

Reply via email to