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

Re: svn merge segfaults

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-10-17 16:04:01 CEST

Lübbe Onken <l.onken@rac.de> writes:

> Hi Folks,
> I can easily make svn merge segfault by doing the following:
> I've got two directories:
> ~/trunk = checkout from http://repos/trunk
> ~/branch = checkout from http://repos/branch
> I'm in ~/branch and do the following:
> --- SNIP ---
> lonken_at_ra:~/branch > svn merge -r 365:511 https://repos/branch
> A exe
> Segmentation fault

So you're merging a bunch of branch-changes into the branch. At most,
you should get a bunch of conflicts due to redundancies. There should
*never* be a segfault for any reason.

What version of SVN is this?

Can you give us a *precise* recipe to reproduce?

> Note, that the first thing svn merge is trying to do, is to add a directory
> that has been created in branch and doesn't exist in rev 365 yet. I know
> that when no wc is given, it defaults to '.' and merging branch into itself
> doesn't make much sense (or does it?), but wouldn't it be smarter to check
> whether the target has got the same url as the source instead of crashing?

No, 'svn merge' isn't a "smart" command. It just applies tree-diffs
to a working copy. If the user uses this command to apply a
nonsensical patch to a tree, the worst thing that should happen is a
bunch of conflicts or obstructions. GNU 'patch' doesn't segfault when
hunks fail to apply, and neither should 'svn merge'.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 17 16:06:32 2003

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.