Andreas Klauer wrote: > 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?
Write a script that walks an RCS file, and for each revision, generates the fulltext from the stored diffs, pipes the fulltext through your filter, diffs it against the previous revision, and writes out the new form. Don't forget to use the "next" properties to handle branches correctly. I.e. - not a trivial task. Max. _______________________________________________ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
