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

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

From: Daniel L. Rall <dlr_at_collab.net>
Date: 2007-10-29 18:23:24 CET

On Mon, 29 Oct 2007, kameshj@tigris.org wrote:

> Author: kameshj
> Date: Mon Oct 29 06:02:21 2007
> New Revision: 27455
>
> Log:
> Code refactor.
>
> * subversion/libsvn_client/merge.c
> (svn_client_merge_peg3): Assign iteration independent 'merge_cmd_baton'
> members out of iteration loop.
> Call do_merge with FALSE for 'three way merge' rather than indirectly via
> merge_cmd_baton.

This is inscrutable -- FALSE what?

>
>
> Modified:
> trunk/subversion/libsvn_client/merge.c
>
> Modified: trunk/subversion/libsvn_client/merge.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/merge.c?pathrev=27455&r1=27454&r2=27455
> ==============================================================================
> --- trunk/subversion/libsvn_client/merge.c (original)
> +++ trunk/subversion/libsvn_client/merge.c Mon Oct 29 06:02:21 2007
> @@ -4534,6 +4534,25 @@
> /* Compact the list to remove redundances and such. */
> SVN_ERR(compact_merge_ranges(&merge_range_ts, merge_range_ts, pool));
>
> + merge_cmd_baton.force = force;
> + merge_cmd_baton.record_only = record_only;
> + merge_cmd_baton.dry_run = dry_run;
> + merge_cmd_baton.ctx = ctx;
> + merge_cmd_baton.target_missing_child = FALSE;
> + merge_cmd_baton.target = target_wcpath;
> + merge_cmd_baton.url = URL;
> + merge_cmd_baton.pool = subpool;
> + merge_cmd_baton.merge_options = merge_options;
> + if (dry_run)
> + merge_cmd_baton.dry_run_deletions = apr_hash_make(pool);
> + notify_b.merge_b = &merge_cmd_baton;
> + /* Set up the diff3 command, so various callers don't have to. */
> + cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
> + APR_HASH_KEY_STRING) : NULL;
> + svn_config_get(cfg, &(merge_cmd_baton.diff3_cmd),
> + SVN_CONFIG_SECTION_HELPERS,
> + SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
> +
> for (i = 0; i < merge_range_ts->nelts; i++)
> {
> svn_merge_range_t *mergerange = APR_ARRAY_IDX(merge_range_ts, i,
> @@ -4549,35 +4568,22 @@
> initial_rev2.kind = svn_opt_revision_number;
> initial_rev2.value.number = mergerange->end;
>
> - merge_cmd_baton.force = force;
> - merge_cmd_baton.record_only = record_only;
> - merge_cmd_baton.dry_run = dry_run;
> - merge_cmd_baton.target_missing_child = FALSE;
> - merge_cmd_baton.merge_options = merge_options;
> - merge_cmd_baton.target = target_wcpath;
> - merge_cmd_baton.url = URL;
> merge_cmd_baton.added_path = NULL;
> merge_cmd_baton.add_necessitated_merge = FALSE;
> if (dry_run)
> - merge_cmd_baton.dry_run_deletions = apr_hash_make(subpool);
> + svn_hash__clear(merge_cmd_baton.dry_run_deletions);
> merge_cmd_baton.conflicted_paths = NULL;
> - merge_cmd_baton.ctx = ctx;
> - merge_cmd_baton.pool = subpool;
> merge_cmd_baton.operative_merge = FALSE;
> merge_cmd_baton.target_has_dummy_merge_range = FALSE;
> merge_cmd_baton.override_set = FALSE;
> + /* do_merge and do_single_file_merge makes merge_cmd_baton->ra_session1
> + and merge_cmd_baton->ra_session2 point to memory locations of
> + iteration scope. Reparenting on those temporary locations will cause
> + segfault, So assigning both the sessions with persistent memory. */
> merge_cmd_baton.ra_session1 = ra_session;
> merge_cmd_baton.ra_session2 = NULL;
> - notify_b.merge_b = &merge_cmd_baton;
> SVN_ERR(from_same_repos(&merge_cmd_baton, entry, ctx, subpool));
>
> - /* Set up the diff3 command, so various callers don't have to. */
> - cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
> - APR_HASH_KEY_STRING) : NULL;
> - svn_config_get(cfg, &(merge_cmd_baton.diff3_cmd),
> - SVN_CONFIG_SECTION_HELPERS,
> - SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
> -
> /* Transform the peg-rev syntax into two explicit merge source
> locations. */
> SVN_ERR(svn_client__repos_locations(&URL1, &rev1,
> @@ -4663,7 +4669,7 @@
> URL2,
> range.end,
> is_rollback,
> - merge_cmd_baton.target_missing_child,
> + FALSE,
> target_wcpath,
> adm_access,
> depth,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

-- 
Daniel Rall

  • application/pgp-signature attachment: stored
Received on Mon Oct 29 18:44:47 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.