You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Seth Arnold <sa...@immunix.com> on 2005/05/27 21:47:11 UTC

svn diff -x -b

Hello; I find it a bit unfortunate that svn diff doesn't understand -b
(ignore whitespace) by default. It seems further unfortunate that in
order to pass -b to diff, one must change from:
  svn diff foo bar
to:
  svn diff --diff-cmd diff -x -ub foo bar

Yes, it works, but it's annoying. :) Anyway, it'd be keen if the built-in
differ could grok a larger subset of GNU diff's options, such as -b
(ignore whitespace) and -p (show C function).

Thanks :)

Re: svn diff -x -b

Posted by Julian Foad <ju...@btopenworld.com>.
Seth Arnold wrote:
> Hello; I find it a bit unfortunate that svn diff doesn't understand -b
> (ignore whitespace) by default. It seems further unfortunate that in
> order to pass -b to diff, one must change from:
>   svn diff foo bar
> to:
>   svn diff --diff-cmd diff -x -ub foo bar

I agree that it would be nice if the built-in diff had some useful options like 
ignoring space changes, and/or if there were a better way to use external 
"diff" commands.  Patches are welcome.  It would be best to discuss exactly 
what behaviour you propose to add before finishing and submitting a patch for it.

Further, we need a flexible, configurable way to have different external diff 
commands invoked automatically for different file types.  Easier use of 
external diff commands might well come as part of this feature.

>  it'd be keen if the built-in
> differ could grok a larger subset of GNU diff's options, such as -b
> (ignore whitespace) and -p (show C function).

Whether its options should be a subset of GNU diff's options, and whether the 
"show C function" option is a sensible one, are up for discussion.  (My 
personal preference: "mostly" and "no" respectively.)

I/we would be happy to help you develop any such feature.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn diff -x -b

Posted by Seth Arnold <se...@suse.de>.
On Wed, Jun 01, 2005 at 01:18:59AM +0200, Marcus Rueckert wrote:
> there is a diff-cmd option in "~/.subversion/config". the only point
> which is missing is a "diff-cmd-params"-option.

While this is all true, my main point is that my users complained that
they are very used to typing 'diff -b' when they want whitespace to be
ignored, and svn diff did not follow this convention.

Yes, you _can_ get svn diff to ignore whitespace. No, it is not very
onerous. It _is_ however a frustrating moment in one's day...

Re: svn diff -x -b

Posted by Marcus Rueckert <da...@web.de>.
On 2005-05-27 14:47:11 -0700, Seth Arnold wrote:
> Hello; I find it a bit unfortunate that svn diff doesn't understand -b
> (ignore whitespace) by default. It seems further unfortunate that in
> order to pass -b to diff, one must change from:
>   svn diff foo bar
> to:
>   svn diff --diff-cmd diff -x -ub foo bar
> 
> Yes, it works, but it's annoying. :) Anyway, it'd be keen if the built-in
> differ could grok a larger subset of GNU diff's options, such as -b
> (ignore whitespace) and -p (show C function).

there is a diff-cmd option in "~/.subversion/config". the only point
which is missing is a "diff-cmd-params"-option.

you can of course do 
"diff-cmd = $HOME/bin/svn-diff"

and svn-diff would be:
"""
#!/bin/sh
exec /usr/bin/diff -ubrN "$@"
"""

just my 2 cents

darix

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn diff -x -b

Posted by John Belmonte <jo...@neggie.net>.
> Hello; I find it a bit unfortunate that svn diff doesn't understand -b
> (ignore whitespace) by default. It seems further unfortunate that in
> order to pass -b to diff, one must change from:
>   svn diff foo bar
> to:
>   svn diff --diff-cmd diff -x -ub foo bar
> 
> Yes, it works, but it's annoying. :) Anyway, it'd be keen if the built-in
> differ could grok a larger subset of GNU diff's options, such as -b
> (ignore whitespace) and -p (show C function).

My suggestion: get aquainted with your shell.  For example:

  $ alias svndiff='svn diff --diff-cmd diff -x -ub'
  $ svndiff foo bar

or:

  $ diffb='diff --diff-cmd diff -x -ub'
  $ svn $diffb foo bar


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org