subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Foad <julianf...@btopenworld.com>
Subject Re: crash when merging
Date Mon, 03 Jun 2013 22:32:49 GMT
I (Julian Foad) wrote:

> I (Julian Foad) wrote:
>>  Stefan Küng <tortoisesvn@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

Mime
View raw message