Login | Register
My pages Projects Community openCollabNet

Discussions > users [DISABLED] > Re: Is there a way to unset the built-in -u option to diff command?

subversion
Discussion topic

Back to topic list

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

Author Andrey Repin <anrdaemon at freemail dot ru>
Full name Andrey Repin <anrdaemon at freemail dot ru>
Date 2009-04-03 12:25:20 PDT
Message Greetings, Paul Koning!

>> 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.

Moreover, the SVN behavior in this regard inconsistent.
My tests to now:

A. Using internal diff library.
1> svn diff
unified diff

2> svn diff -x -b
unified diff

2> svn diff -x -cb
svn: Error parsing diff options: Bad character specified on command line
(expected, but quite disturbing, as this is most human-readable diff format)

B. Using external diff (script
> echo %* 1>&2
> C:/bin/diff.exe %*
so I can control the passed parameters)
1> svn diff
Parameters passed:
-u -L "file1 (revision 9)" -L "file2 (working copy)" file1 file2
unified diff

2> svn diff -x -b
Parameters passed:
-b -L "file1 (revision 9)" -L "file2 (working copy)" file1 file2
raw diff (lines removed-lines added)

2> svn diff -x -cb
Parameters passed:
-cb -L "file1 (revision 9)" -L "file2 (working copy)" file1 file2
contextual diff (lines changed-lines removed-lines added)

And there's no way to set the external diff parameters in config. Or am I
doing it wrong?


--
WBR,
 Andrey Repin (anrdaemon at freemail dot ru) 03.04.2009, <23:14>

Sorry for my terrible english...

« Previous message in topic | 6 of 11 | Next message in topic »

Messages

Show all messages in topic

Is there a way to unset the built-in -u option to diff command? Andrey Repin <anrdaemon at freemail dot ru> Andrey Repin <anrdaemon at freemail dot ru> 2009-04-03 11:05:02 PDT
     Re: Is there a way to unset the built-in -u option to diff command? Paul Koning <Paul_Koning at dell dot com> Paul Koning <Paul_Koning at dell dot com> 2009-04-03 11:09:42 PDT
         Re: Is there a way to unset the built-in -u option to diff command? Andrey Repin <anrdaemon at freemail dot ru> Andrey Repin <anrdaemon at freemail dot ru> 2009-04-03 11:45:04 PDT
             Re: Is there a way to unset the built-in -u option to diff command? hkodungallur Hari Kodungallur 2009-04-03 11:53:15 PDT
     Re: Is there a way to unset the built-in -u option to diff command? Paul Koning <Paul_Koning at dell dot com> Paul Koning <Paul_Koning at dell dot com> 2009-04-03 11:58:37 PDT
         Re: Is there a way to unset the built-in -u option to diff command? Andrey Repin <anrdaemon at freemail dot ru> Andrey Repin <anrdaemon at freemail dot ru> 2009-04-03 12:25:20 PDT
             Re: Is there a way to unset the built-in -u option to diff command? Andrey Repin <anrdaemon at freemail dot ru> Andrey Repin <anrdaemon at freemail dot ru> 2009-04-03 13:45:21 PDT
         Re: Is there a way to unset the built-in -u option to diff command? stsp Stefan Sperling 2009-04-03 12:29:41 PDT
         Re: Is there a way to unset the built-in -u option to diff command? hkodungallur Hari Kodungallur 2009-04-03 12:39:12 PDT
     Re: Is there a way to unset the built-in -u option to diff command? Paul Koning <Paul_Koning at dell dot com> Paul Koning <Paul_Koning at dell dot com> 2009-04-03 13:20:36 PDT
         Re: Is there a way to unset the built-in -u option to diff command? stsp Stefan Sperling 2009-04-04 06:02:26 PDT
Messages per page: