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

Re: [PATCH] Split up the reintegrate merge API: first find what to do, then do it - v2

From: DanielShahaf <danielsh_at_elego.de>
Date: Sun, 11 Dec 2011 22:29:43 +0200

[ Caveat: I'm not at all familiar with merge.c ]

Julian Foad wrote on Sun, Dec 11, 2011 at 19:35:04 +0000:
>   The svn client reintegrate merge code calls:
>
>     svn_client_find_reintegrate_merge(&url1, &rev1, &url2, &rev2,
> ...);     svn_client_merge4(url1, rev1, url2, rev2, ...);
...
> If no objections I plan to commit this, without the extra messages
> about two-url-command (which I'll come back to later).

Looks good.

> @@ -10628,31 +10631,76 @@ merge_reintegrate_locked(const char *sou
>
> /* Left side: trunk_at_youngest-trunk-rev-merged-to-branch-at-specified-peg-rev
> * Right side: branch_at_specified-peg-revision */
> + *source_p = apr_pmemdup(result_pool, &source, sizeof(source));
> + return SVN_NO_ERROR;
> +}
>
> - /* Do the real merge! */
> - /* ### TODO(reint): Make sure that one isn't the same line ancestor
> - ### of the other (what's erroneously referred to as "ancestrally
> - ### related" in this source file). We can merge to trunk without
> - ### implementing this. */
> - err = merge_cousins_and_supplement_mergeinfo(target_abspath,
> - target_ra_session,
> - source_ra_session,
> - &source, yc_ancestor_rev,
> - TRUE /* same_repos */,
> - svn_depth_infinity,
> - FALSE /* ignore_ancestry */,
> - FALSE /* force */,
> - FALSE /* record_only */,
> - dry_run,

Could you clarify why this is removed? I don't see it added elsewhere
in the patch. Is it a functional change? Or do the diff hunks form an
optical illusion here?

> +merge_reintegrate_locked(const char *source_path_or_url,
> + const svn_opt_revision_t *source_peg_revision,
> + const char *target_abspath,
> + svn_boolean_t dry_run,
> + const apr_array_header_t *merge_options,
> + svn_client_ctx_t *ctx,
> + apr_pool_t *scratch_pool)
> +{
> + if (source->url1)
> + {
> + svn_opt_revision_t revision1
> + = { svn_opt_revision_number, { source->rev1 } };
> + svn_opt_revision_t revision2
> + = { svn_opt_revision_number, { source->rev2 } };

ISTR we had trouble in the past with some compilers not allowing these
non-constant initializers. (Fix would be to unroll the initialization
into separate lines of code.)

>

Thanks!

Daniel
Received on 2011-12-11 21:30:36 CET

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.