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

Re: diff with --diff-cmd errors out

From: Martin J. Stumpf <mjs_at_jhu.edu>
Date: 2005-06-17 03:11:42 CEST
Michael L Brown wrote:
I get an error when trying to do the following:

soldev57.ZCURR <148> svn diff --diff-cmd /usr/bin/diff -x "-C 1" 
ReleaseFileList
 
Index: ReleaseFileList
===================================================================
/usr/bin/diff: illegal option -- L
usage: diff [-bitw] [-c | -e | -f | -h | -n] file1 file2
       diff [-bitw] [-C number] file1 file2
       diff [-bitw] [-D string] file1 file2
       diff [-bitw] [-c | -e | -f | -h | -n] [-l] [-r] [-s] [-S name] 
directory1 directory2
svn: '/usr/bin/diff' returned 2


I personally prefer context diffs and tried to do what the manual 
suggests, but as you can see from the above, it appears that svn is 
passing a -L option to diff and it is falling over because of it.  Any way 
to fix that?

Thanks.

Mike,
I have no problem with your exact command on linux with gnu diff and svn 1.2.
Something else must be going on there.

BTW, I use a script to get the diff arguments that I like and specifiy the script in my .subversion/config file.

Here is the relevant part of my config file:

[helpers]
editor-cmd = emacs
diff-cmd = /usr/local/bin/svndiff
# diff3-cmd = diff3_program (diff3, gdiff3, etc.)
# diff3-has-program-arg = [true | false]

And svndiff looks like this to collapse all tabs to spaces for a condensed screen output:

#!/bin/bash
diff -w "$@" | sed -e "s/\t/ /g"

hth,

Martin


--

Martin J. Stumpf
Division of Medical Imaging Physics, Department of Radiology
Johns Hopkins University School of Medicine
601 North Caroline Street / JHOC 4230
Baltimore, Maryland 21287-0859 USA
Voice: (410) 614-0115 Fax: (410) 614-9979
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org For additional commands, e-mail: users-help@subversion.tigris.org Received on Fri Jun 17 03:15:32 2005

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