[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
normalizing files and old revisions
From: |
Andreas Klauer |
Subject: |
normalizing files and old revisions |
Date: |
Sun, 31 Aug 2003 15:50:58 +0200 |
Hello,
in order to get rid of whitespace problems (tabs<->spaces, trailing spaces,
CRLF(\r\n)<->LF(\n) linefeeds) I want to add a filter to CVSROOT/commitinfo,
which normalizes (modifies) the corresponding files before they are commited.
Can anyone confirm that this is the way to go? I got this solution from the
cvsIndent project, which reformats whole files when commited. Is there a
better one?
Now, to my main problem:
The repository already contains files which use tabs, CRLF, et cetera.
Corresponding diffs to old revisions already contain loads of unnecessary
whitespace changes. I'd like to get rid of these diffs, to make comparisons
between never revisions (which use filter) and older revisions (which didn't
have the filter) possible without getting all this whitespace changes junk.
Is it possible somehow to rebuild the repository, to apply this normalizer to
old revisions, without influencing commit dates, authors, log entrys,
statistics, so that the resulting repository looks like as if the normalizer
script was used from the very beginning? I want to make this change
completely silently.
I suppose that this is not quite in the CVS spirit, because this way old
revisions can't be restored the way they really were. However, I have backups
of the repository so that isn't a problem, and it's highly unlikely that
whitespace changes will affect anything anyway. I'd really prefer to have
clean diffs. And I can't use diff's 'ignore whitespace'-option, because the
normalizer script probably will do other things too (like conversion of
charsets, german umlauts, ...)
Any hints on how to do this?
TIA,
Andreas Klauer
- normalizing files and old revisions,
Andreas Klauer <=