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

Re: svn diff --diff-cmd=diff fails if there is a modified binary file

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 12 Oct 2009 17:44:29 +0100

On Mon, Oct 12, 2009 at 06:21:29PM +0200, Peter Cech wrote:
> Hello,
>
> the diff command (part of coreutils IIRC) returns status 2 if there is
> a difference in binary files (status 1 means a difference in text
> files). Subversion apparently only accepts return status 0 and 1.
> Attempt to retrieve a diff from repository
>
> svn diff --diff-cmd=diff -c 3916 svn://localhost/
>
> yields an error:
>
> svn: 'diff' returned 2

That's not portable. E.g. OpenBSD's diff returns >1 to indicate
that "an error occured".

You might want to use a wrapper script around GNU diff which interprets
the exit code and transforms it to either 0 or 1.

> The attached patch fixes the issue for me. Does it look like right/
> complete way of fixing this issue?

Looks like you forgot to attach it.

Stefan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2406731
Received on 2009-10-12 18:44:59 CEST

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.