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

Re: crash when merging

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 3 Jun 2013 23:32:49 +0100 (BST)

I (Julian Foad) wrote:

> I (Julian Foad) wrote:
>> Stefan Küng <tortoisesvn_at_gmail.com> wrote:
> This is the patch needed, modeled on the existing 'reintegrate' code
> (that's where the slightly strange error code comes from):
>
> [[[
> Index: subversion/libsvn_client/merge.c
> ===================================================================
> --- subversion/libsvn_client/merge.c    (revision 1489184)
> +++ subversion/libsvn_client/merge.c    (working copy)
> @@ -12307,6 +12307,12 @@
>    SVN_ERR(svn_client__get_youngest_common_ancestor(
>              &s_t->yca, s_t->source, &s_t->target->loc, s_t->source_ra_session,
>              ctx, result_pool, result_pool));
> +  if (! s_t->yca)
> +    return svn_error_createf(SVN_ERR_CLIENT_NOT_READY_TO_MERGE, NULL,
> +                             _("'%s@%ld' must be ancestrally related to "
> +                               "'%s@%ld'"),
> +                             s_t->source->url, s_t->source->rev,
> +                             s_t->target->loc.url, s_t->target->loc.rev);
>  
>    /* Find the latest revision of A synced to B and the latest
>     * revision of B synced to A.
> ]]]
>
> Committed in r1489203.

The svn_client_get_merging_summary() API uses the same code, and had the same bug, and the same fix fixes it.  'svn mergeinfo' uses that API and, like 'svn merge', avoids the problem by checking ancestry before calling it.  I tested it in the same way -- by disabling the ancestry check in 'mergeinfo-cmd.c', and running 'svn mergeinfo' by hand.

I've proposed r1489203 for back-port to 1.8.x.

- Julian
Received on 2013-06-04 00:34:51 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.