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

Re: [PATCH] Allow the merge tool to abort the merge

From: Augie Fackler <durin42_at_gmail.com>
Date: Fri, 2 Jan 2009 10:23:55 -0600

On Jan 2, 2009, at 5:53 AM, John Szakmeister wrote:

> On Fri, Jan 2, 2009 at 5:38 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> [snip]
>>> if the merge fails, the tool
>>> exits nonzero and then you end up with a conflicted file at the
>>> end (at
>>> least, barring any bugs). It feels wrong (to me at least) to provide
>>> special meaning to non-{0,1} exits. That's my 2ยข.
>> The problem is that John wants to control from his merge tool
>> whether svn aborts the merge if the merge tool fails, or whether
>> svn continues with the merge regardless.
>> This is not the same problem as "merge tool fails or not".
> It might be helpful to point out that the unix diff command has long
> supported this kind of concept:
> :: echo $?
> 0
> :: diff BRANCH.TODO NEWS > /dev/null
> :: echo $?
> 1
> :: diff BRANCH.TODO bogus
> diff: bogus: No such file or directory
> :: echo $?
> 2
> I believe our implementation of diff follows the same precedent. The
> unix 'merge' tool also has similar semantics. This is a snippet from
> the man page:
> Exit status is 0 for no conflicts, 1 for some conflicts, 2 for
> trouble
> I personally think what John is asking for is reasonable.

Fair enough - it's clear I don't understand something here the same as
everyone else, so I'm going to beat this horse one more time to try
and figure out where I'm wrong. When the merge runs, it ends up in the
WC, so if the merge tool exited nonzero, we know there will be a 'C'
status in svn st output. Why is it *necessary* for the svn tool to
abort to achieve what John wants to do? Wouldn't svn st | egrep '^C'
give similar information?


> -John
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=999758


  • application/pkcs7-signature attachment: smime.p7s
Received on 2009-01-02 17:47:45 CET

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