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

Revert only whitespace changes

From: Markus Schaber <m.schaber_at_3s-software.com>
Date: Tue, 14 Jun 2011 11:47:48 +0200

Hi,

Occasionally, we have source files which contain - apart from the
changes made by the developer - a lot of whitespace changes introduced
by reformatting the code. (Mainly tabs<->spaces conversions and trailing
whitespace.)

While Subversion and TortoiseSVN offer the possibility to ignore those
white space changes when diffing the files, a commit still includes
those changes, and thus the diff in the SVN history is cluttered, which
causes problems for reviewers.

I found no possibility to selectively revert those lines to their
original state via SVN but manually reverting all those lines in a diff
viewer.

Is there any tool which reverts all those whitespace-only changes,
keeping only the "real" changes in the file?

Bonus points for a tool which keeps real indentation changes, and only
discards tab<->space conversions which do not change the indentation
level. :-)

(I know that a project-wide style guide and rejecting commits which do
not conform to that style guide are the long term solution to that
problem, and we're aiming towards that.)

Best regards

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 |
Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915
Received on 2011-06-14 11:49:41 CEST

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