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

Re: [PATCH] Check for cancel function in repos->repos and wc->reposcopy

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Tue, 25 Mar 2008 09:42:39 -0500

Bhuvaneswaran Arumugam wrote:
> Hi,
>
> We check for cancel function during wc->wc and repos->wc copy. But we do
> not check for this function for other copy operations. Please find
> attached a patch to check it during repos->repos and wc->repos copy
> operation.
>
> [[
> Check for cancel function during repos->repos and wc->repos copy
> operation.
>
> * subversion/libsvn_client/copy.c
> (repos_to_repos_copy, wc_to_repos_copy): Check for cancel function.
> ]]
>
>
> Index: subversion/libsvn_client/copy.c
> ===================================================================
> --- subversion/libsvn_client/copy.c (revision 30040)
> +++ subversion/libsvn_client/copy.c (working copy)
> @@ -997,6 +997,9 @@
> {
> path_driver_info_t *info = APR_ARRAY_IDX(path_infos, i,
> path_driver_info_t *);
> + /* Check for cancellation */
> + if (ctx->cancel_func)
> + SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
> apr_hash_t *mergeinfo;

mergeinfo should be declared before the if statement.

Also, should this be in path_driver_cb_func() instead?

> SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo, NULL,
> info->src_url, info->src_revnum,
> @@ -1267,6 +1270,10 @@
> svn_client_commit_item3_t *item =
> APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
>
> + /* Check for cancellation */
> + if (ctx->cancel_func)
> + SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
> +
> /* Set the mergeinfo for the destination to the combined merge
> info known to the WC and the repository. */
> item->outgoing_prop_changes = apr_array_make(pool, 1,

This looks to be inside a loop which just sets up the copy, but doesn't
perform the actual copy. We are already checking for cancelation inside
of sn_client__do_commit(), so I don't know that this extra check is needed.

-Hyrum

Received on 2008-03-25 15:42:57 CET

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