[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r38635 - trunk/subversion/libsvn_client

From: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Fri, 7 Aug 2009 22:03:40 -0500

Paul,
I'm not sure if this function was just cruft, or part of some as-yet-
unimplemented Grand Plan. If the latter, feel free to resurrect it.

-Hyrum

On Aug 7, 2009, at 9:49 PM, Hyrum K. Wright wrote:

> Author: hwright
> Date: Fri Aug 7 19:49:28 2009
> New Revision: 38635
>
> Log:
> Remove svn_client__elide_mergeinfo(). It isn't used *anywhere*,
> which is the
> definition of dead code.
>
> * subversion/libsvn_client/mergeinfo.c
> (svn_client__elide_children): Remove.
>
> * subversion/libsvn_client/mergeinfo.h
> (svn_client__elide_children): Remove.
>
> Modified:
> trunk/subversion/libsvn_client/mergeinfo.c
> trunk/subversion/libsvn_client/mergeinfo.h
>
> Modified: trunk/subversion/libsvn_client/mergeinfo.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/mergeinfo.c?pathrev=38635&r1=38634&r2=38635
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_client/mergeinfo.c Fri Aug 7 19:28:23
> 2009 (r38634)
> +++ trunk/subversion/libsvn_client/mergeinfo.c Fri Aug 7 19:49:28
> 2009 (r38635)
> @@ -637,7 +637,7 @@ should_elide_mergeinfo(svn_boolean_t *el
> return SVN_NO_ERROR;
> }
>
> -/* Helper for svn_client__elide_mergeinfo() and
> svn_client__elide_children().
> +/* Helper for svn_client__elide_mergeinfo().
>
> Given a working copy PATH, its mergeinfo hash CHILD_MERGEINFO, and
> the mergeinfo of PATH's nearest ancestor PARENT_MERGEINFO, use
> @@ -689,110 +689,6 @@ elide_mergeinfo(svn_mergeinfo_t parent_m
>
>
> svn_error_t *
> -svn_client__elide_children(apr_array_header_t
> *children_with_mergeinfo,
> - const char *target_wcpath,
> - const svn_wc_entry_t *entry,
> - svn_wc_adm_access_t *adm_access,
> - svn_client_ctx_t *ctx,
> - apr_pool_t *pool)
> -{
> - const char *target_abspath;
> -
> - SVN_ERR(svn_dirent_get_absolute(&target_abspath, target_wcpath,
> pool));
> -
> - if (children_with_mergeinfo && children_with_mergeinfo->nelts)
> - {
> - int i;
> - const char *last_immediate_child;
> - svn_mergeinfo_t target_mergeinfo;
> - apr_pool_t *iterpool = svn_pool_create(pool);
> -
> - /* Get mergeinfo for the target of the merge. */
> - SVN_ERR(svn_client__parse_mergeinfo(&target_mergeinfo, ctx-
> >wc_ctx,
> - target_abspath, pool,
> pool));
> -
> - /* For each immediate child of the merge target check if
> - its merginfo elides to the target. */
> - for (i = 0; i < children_with_mergeinfo->nelts; i++)
> - {
> - svn_mergeinfo_t child_mergeinfo;
> - svn_boolean_t switched;
> - const char *child_abspath;
> - svn_client__merge_path_t *child =
> - APR_ARRAY_IDX(children_with_mergeinfo, i,
> - svn_client__merge_path_t *);
> - svn_pool_clear(iterpool);
> -
> - if (!child)
> - continue;
> -
> - if (child->absent)
> - continue;
> -
> - if (i == 0)
> - {
> - /* children_with_mergeinfo is sorted depth
> - first so first path might be the target of
> - the merge if the target had mergeinfo prior
> - to the start of the merge. */
> - if (strcmp(target_wcpath, child->path) == 0)
> - {
> - last_immediate_child = NULL;
> - continue;
> - }
> - last_immediate_child = child->path;
> - }
> - else if (last_immediate_child
> - && svn_path_is_ancestor(last_immediate_child,
> child->path))
> - {
> - /* Not an immediate child. */
> - continue;
> - }
> - else
> - {
> - /* Found the first (last_immediate_child == NULL)
> - or another immediate child. */
> - last_immediate_child = child->path;
> - }
> -
> - SVN_ERR(svn_dirent_get_absolute(&child_abspath, child-
> >path,
> - iterpool));
> -
> - /* Don't try to elide switched children. */
> - SVN_ERR(svn_wc__path_switched(&switched, ctx->wc_ctx,
> child_abspath,
> - iterpool));
> - if (!switched)
> - {
> - const char *path_prefix = svn_dirent_dirname(child-
> >path,
> - iterpool);
> - const char *path_suffix = svn_dirent_basename(child-
> >path,
> -
> iterpool);
> -
> - SVN_ERR(svn_client__parse_mergeinfo(&child_mergeinfo,
> - ctx->wc_ctx,
> child_abspath,
> - iterpool,
> iterpool));
> -
> - while (strcmp(path_prefix, target_wcpath) != 0)
> - {
> - path_suffix =
> svn_path_join(svn_dirent_basename(path_prefix,
> -
> iterpool),
> - path_suffix, iterpool);
> - path_prefix = svn_dirent_dirname(path_prefix,
> iterpool);
> - }
> -
> - SVN_ERR(elide_mergeinfo(target_mergeinfo,
> child_mergeinfo,
> - child_abspath, path_suffix,
> ctx,
> - iterpool));
> - }
> - }
> - svn_pool_destroy(iterpool);
> - }
> -
> - return SVN_NO_ERROR;
> -}
> -
> -
> -svn_error_t *
> svn_client__elide_mergeinfo(const char *target_wcpath,
> const char *wc_elision_limit_path,
> const svn_wc_entry_t *entry,
>
> Modified: trunk/subversion/libsvn_client/mergeinfo.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/mergeinfo.h?pathrev=38635&r1=38634&r2=38635
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- trunk/subversion/libsvn_client/mergeinfo.h Fri Aug 7 19:28:23
> 2009 (r38634)
> +++ trunk/subversion/libsvn_client/mergeinfo.h Fri Aug 7 19:49:28
> 2009 (r38635)
> @@ -256,22 +256,6 @@ svn_client__elide_mergeinfo(const char *
> svn_client_ctx_t *ctx,
> apr_pool_t *pool);
>
> -/* For each path in CHILDREN_WITH_MERGEINFO which is an immediate
> child of
> - TARGET_WCPATH, check if that path's mergeinfo elides to
> TARGET_WCPATH.
> - If it does elide, clear all mergeinfo from the path.
> -
> - CHILDREN_WITH_MERGEINFO is filled with child paths (struct
> - merge_path_t *) of TARGET_WCPATH which have svn:mergeinfo set on
> - them, arranged in depth first order (see
> - discover_and_merge_children). */
> -svn_error_t *
> -svn_client__elide_children(apr_array_header_t
> *children_with_mergeinfo,
> - const char *target_wcpath,
> - const svn_wc_entry_t *entry,
> - svn_wc_adm_access_t *adm_access,
> - svn_client_ctx_t *ctx,
> - apr_pool_t *pool);
> -
> /* A wrapper which calls svn_client__elide_mergeinfo() on each child
> in CHILDREN_WITH_MERGEINFO in depth-first. */
> svn_error_t *
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=2381526

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2381528
Received on 2009-08-08 05:04:32 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.