Saturday 17 November 2007

Using WinMerge to compare CVS branches

I often have trouble with CVS merge, and so end up comparing the files manually. The problem is that the CVS Revision and Log tags should not show up as a difference. I wanted something similar to "Ignore whitespaces".

For the revision tag, the regular expression filter in WinMerge works fine: WinMerge, Tools, Filters, LineFilters: $Revision\: .*$
For the CVS commit history log, I have implemented a prediffer Plugin similar to Plugins\src_VCPP\IgnoreCommentsC from the source code of WinMerge.

The source code for the prediffer plugin is here:

WinMergeScript.cpp

This is specifically designed for Delphi code. It should be easy to adapt to different languages.

No comments: