I (Julian Foad) wrote:
> Stefan Küng <tortoisesvn_at_gmail.com> wrote:
>> SVN_ERR_W(svn_cl__check_related_source_and_target(
>> sourcepath1, &peg_revision1,
>> targetpath, &unspecified_revision, ctx, scratch_pool),
>> _("Source and target must be different but related branches"));
>>
>> To reproduce the crash with the CL client, simply remove that check and do
>> the merge.
>
> Thanks, Stefan. Confirmed. We need a check just before reaching line 12345
> (yes, really) of merge.c.
(Oops, that pretty line number was in a locally modified version of merge.c. It's line 12311 in the current head version.)
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.
- Julian
Received on 2013-06-04 00:13:48 CEST