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

Re: svn commit: r23454 - in trunk/subversion: include libsvn_client libsvn_subr

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-02-21 18:35:41 CET

Looks like an unrelated change to svn_opt_resolve_revisions() slipped
into this commit.

- Dan

On Wed, 21 Feb 2007, hwright@tigris.org wrote:

> Author: hwright
> Date: Wed Feb 21 08:49:45 2007
> New Revision: 23454
>
> Log:
> When harvesting copy committables, extend the use of the copy_pair loop
> iterpool to the actual call to harvest_committables(), and document why this
> is possible.
>
> The primary concern is that the commit_items added to the committables hash are
> not allocated from the loop pool. But, because add_committable() uses the hash
> pool to allocate the new commit_items, we can safely use the loop pool when
> calling harvest_committables().
>
> This is a followup to r23403.
>
> * subversion/libsvn_client/commit_util.c
> (add_committable, harvest_committables): Update comments to note the fact
> that the new committable is allocated from the same pool as the committables
> hash.
> (svn_client__get_copy_committables): Use the iterpool for calls to
> harvest_committables(), and add a comment explaining why this is possible.
>
>
> Modified:
> trunk/subversion/include/svn_opt.h
> trunk/subversion/libsvn_client/copy.c
> trunk/subversion/libsvn_client/ra.c
> trunk/subversion/libsvn_subr/opt.c
>
> Modified: trunk/subversion/include/svn_opt.h
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/include/svn_opt.h?pathrev=23454&r1=23453&r2=23454
> ==============================================================================
> --- trunk/subversion/include/svn_opt.h (original)
> +++ trunk/subversion/include/svn_opt.h Wed Feb 21 08:49:45 2007
> @@ -392,13 +392,16 @@
> * If @a notice_local_mods is set, @c svn_opt_revision_working is used,
> * instead of @c svn_opt_revision_base.
> *
> + * Use @a pool for allocations.
> + *
> * @since New in 1.5.
> */
> -void
> +svn_error_t *
> svn_opt_resolve_revisions(svn_opt_revision_t *peg_rev,
> svn_opt_revision_t *op_rev,
> svn_boolean_t is_url,
> - svn_boolean_t notice_local_mods);
> + svn_boolean_t notice_local_mods,
> + apr_pool_t *pool);
>
>
> /* Parsing arguments. */
>
> Modified: trunk/subversion/libsvn_client/copy.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/copy.c?pathrev=23454&r1=23453&r2=23454
> ==============================================================================
> --- trunk/subversion/libsvn_client/copy.c (original)
> +++ trunk/subversion/libsvn_client/copy.c Wed Feb 21 08:49:45 2007
> @@ -1343,10 +1343,11 @@
> pair->src_op_revision = *source->revision;
> pair->src_peg_revision = *source->peg_revision;
>
> - svn_opt_resolve_revisions(&pair->src_peg_revision,
> - &pair->src_op_revision,
> - svn_path_is_url(pair->src),
> - TRUE);
> + SVN_ERR(svn_opt_resolve_revisions(&pair->src_peg_revision,
> + &pair->src_op_revision,
> + svn_path_is_url(pair->src),
> + TRUE,
> + iterpool));
> src_basename = svn_path_basename(pair->src, iterpool);
>
> /* Check to see if all the sources are urls or all working copy
> @@ -1372,10 +1373,11 @@
> pair->src_op_revision = *source->revision;
> pair->src_peg_revision = *source->peg_revision;
>
> - svn_opt_resolve_revisions(&pair->src_peg_revision,
> - &pair->src_op_revision,
> - svn_path_is_url(pair->src),
> - TRUE);
> + SVN_ERR(svn_opt_resolve_revisions(&pair->src_peg_revision,
> + &pair->src_op_revision,
> + svn_path_is_url(pair->src),
> + TRUE,
> + pool));
>
> pair->dst = dst_path_in;
> APR_ARRAY_PUSH(copy_pairs, svn_client__copy_pair_t *) = pair;
>
> Modified: trunk/subversion/libsvn_client/ra.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/ra.c?pathrev=23454&r1=23453&r2=23454
> ==============================================================================
> --- trunk/subversion/libsvn_client/ra.c (original)
> +++ trunk/subversion/libsvn_client/ra.c Wed Feb 21 08:49:45 2007
> @@ -886,9 +886,10 @@
>
> start_rev = *revision;
> peg_revision = *peg_revision_p;
> - svn_opt_resolve_revisions(&peg_revision, &start_rev,
> - svn_path_is_url(path_or_url),
> - TRUE);
> + SVN_ERR(svn_opt_resolve_revisions(&peg_revision, &start_rev,
> + svn_path_is_url(path_or_url),
> + TRUE,
> + pool));
>
> SVN_ERR(svn_client__open_ra_session_internal(&ra_session, initial_url,
> NULL, NULL, NULL,
>
> Modified: trunk/subversion/libsvn_subr/opt.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/opt.c?pathrev=23454&r1=23453&r2=23454
> ==============================================================================
> --- trunk/subversion/libsvn_subr/opt.c (original)
> +++ trunk/subversion/libsvn_subr/opt.c Wed Feb 21 08:49:45 2007
> @@ -610,11 +610,12 @@
> }
>
>
> -void
> +svn_error_t *
> svn_opt_resolve_revisions(svn_opt_revision_t *peg_rev,
> svn_opt_revision_t *op_rev,
> svn_boolean_t is_url,
> - svn_boolean_t notice_local_mods)
> + svn_boolean_t notice_local_mods,
> + apr_pool_t *pool)
> {
> if (peg_rev->kind == svn_opt_revision_unspecified)
> {
> @@ -634,7 +635,7 @@
> if (op_rev->kind == svn_opt_revision_unspecified)
> *op_rev = *peg_rev;
>
> - return;
> + return SVN_NO_ERROR;
> }

  • application/pgp-signature attachment: stored
Received on Wed Feb 21 18:36:00 2007

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.