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

Re: Is there a way to unset the built-in -u option to diff command?

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 3 Apr 2009 20:29:31 +0100

On Fri, Apr 03, 2009 at 02:57:24PM -0400, Paul Koning wrote:
> >>>>> "Hari" == Hari Kodungallur <hkodungallur_at_gmail.com> writes:
>
> > I am not sure if you are looking for something similar, but if
> > you pass the following, it shows the unified diff with only the
> > changed line.
> > --diff-cmd diff -x "--unified=0"
>
> The problem is that you can't get rid of the -u. Essentially, SVN
> assumes that all possible things you might supply as diff-cmd are like
> GNU diff. If you want to call a diff program for which -u isn't a
> valid switch, you're stuck, short of wrapping it in a script to get
> rid of the invalid swich.
>
> An example is xxdiff.

I cannot reproduce this problem:

$ cat ~/diffcmd.sh
#!/bin/sh
echo $*
$ svn diff --diff-cmd ~/diffcmd.sh -x '-p -x -w but not minus u' alpha
Index: alpha
===================================================================
-p -x -w but not minus u -L alpha (revision 2) -L alpha (working copy) .svn/text-base/alpha.svn-base /tmp/tempfile.tmp
$

It passes two -L flags (which might arguably be a problem), but not -u.

Stefan
Received on 2009-04-03 21:30:37 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.