How to make svn diff look like diff?

There is another question: how to make diff look like svn diff? but I want the exact opposite. I am trying to get svn diff to display with <and>

The obvious answer would be:

svn diff --diff-cmd /usr/bin/diff  file

but when i do this i get

/usr/bin/diff: illegal option -- L

So i do it

svn diff --diff-cmd /usr/bin/echo  file

to find out what is going on. and he spits it all out, that I see why diff is not like ...

-u -L file (revision 11371) -L file   (working copy) .svn/text-base/file.svn-base file

So ... how do I get svn to actually use another program to distinguish between?

+3
source share
2 answers

You seem to have a version diffinstalled on your system that is too old or incompatible with the way svn wants to invoke it. On my system, the -L option is defined as follows:

   -L label
   --label=label
          Use label instead of the file name in the context format and unified format headers.

, diff, , diff. - , diff ( ) .subversion/configs:

diff-cmd=/home/ether/bin/svndiff-w

... script:

#!/bin/bash
diff=/usr/bin/colordiff
args="-u -wi -U 6 --new-file"    
exec ${diff} ${args} "$@"

.

+6

--diff-cmd, /usr/bin/diff:

svn cat $FILE --revision COMMITTED | diff $FILE -
0

Source: https://habr.com/ru/post/1739194/


All Articles