[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 21:19:06 +0100 (BST)

Stefan Küng <tortoisesvn_at_gmail.com> wrote:

> I've got a small problem. As reported on the TSVN mailing list here:
> http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3057019
> an automatic merge can crash.
> The command line client does not, because it first checks the relationship of
> the urls:
> merge-cmd.c, line 109ff:
> 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.

> Now what should I do in TSVN? That check API is internal, so it's not
> available for TSVN. How can I reject the merge before calling
> svn_client_merge_peg5 to avoid the crash?

Hmm... the YCA code is all private.  I'm not sure what you can do other than duplicate the code or hack the build so the YCA API is accessible to you.

> And why is that check not done in svn_client_merge_peg5 if it's required to
> do so?

It should be in there.  I'll fix it.

- Julian
Received on 2013-06-03 22:20:00 CEST

This is an archived mail posted to the Subversion Dev mailing list.