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

Re: [PATCH] Experimental svn diff -w

From: Bruce DeVisser <bmdmail_at_sympatico.ca>
Date: 2006-02-04 11:40:36 CET

Peter wrote:
>Let me first make it clear that this is just for experimentation. This
>patch is very incomplete, untested and probably buggy.

I assume that means tabs will be supported as well. svn source
policy is against tabs, but others have to deal with them.

The various options proposed cover 99% of my uses of GNU diff,
and dropping any one of them would dramatically decrease that
percentage, so I think they are a good list.

Sander wrote:
> >-i --ignore-case (not sure about this; it has encoding problems)
>
> What's the benefit of this option? I'm trying to think of a use
> case...

There are case-insensitive programming languages. Suppose a style
standardisation (or standards change) is put into effect the same
as subversion's whitespace standardisation now is: it would be
nice if blame would work.

There are case insensitive platforms. If there is any dependence
on filenames in the versioned files relating to those platforms
(include files, directory listings, etc), -i would help. Eg, a
user versions zip archives listings, but depending on
the archive creation tool (of which several may be in use), name
case can be munged; and depending on the listing tool and user
preference, name case can be munged (eg, -L in unzip). Another
example: a makefile is updated using a tool by one user, by hand
by another user, and the two need to be merged together when
there may be unimportant differences in filename case.

>
Sander further wrote:
> >-b --ignore-space-change (for ASCII whitespace)
> >-w --ignore-all-space (dito)
>
> Can't we just pick one option name?

and Jim wrote:
> Have you tried a normalization function which simply replaces all
> whitespace sequences with a single space? Deleting whitespace in most
> programming languages concatenates identifiers, which is a change
> people would usually like to know about.

There seems to be some confusion. This is what -b does,
effectively treating one or more whitespace characters in a row
as a single space. (In GNU diff, whitespace at end of line is
folded into the newline and treated the same as if there were no
whitespace at the end of the line.) Thus the -b option means ignore
changes in the amount of whitespace, but don't ignore an
introduction of a whitespace sequence where none existed before,
or the removal of such a sequence in its entirety.

The -w option, on the other hand, will ignore the complete
removal or introduction of such a sequence.

Both options have their advantages, and I have switched between
them depending on what I'm diffing.

Bruce

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 4 11:41:13 2006

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

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