Swiss File Knife
a command line
free external tools,
download winmerge from sourceforge here.
winmerge source1.cpp source2.cpp
of course, copying just the single .exe means leaving out some features provided by plugins and filters - but so far I use only source code comparison (.cpp, .java) and for that the single .exe is sufficient.
comparing directory tree differences
winmerge is great for comparing two files, but when i try to compare whole directories this way:
winmerge docs-old docsi do get some overview:
but to really find out, for example, that FooBank\DB\source\DBController.cpp is different, I have to invest at least three double mouseclicks.
so let's get back to the command line, and do it fast, using the sfk run command:
sfk run "winmerge $since $file" -sincedif docs-old docs [simulating:] winmerge docs-old\FooBank\DB\source\DBController.cpp docs\...\DBController.cpp winmerge docs-old\FooBank\GUI\include\FooGUI.hpp docs\...\FooGUI.hpp [add -yes to execute.]as we see, there are two different files over the whole directory tree. (option -sincedif lists only different files, not added files.) if we add option "-yes" to above command, the previed winmerge commands are executed:
sfk run "winmerge $since $file" -sincedif docs-old docs -yesrunning winmerge instantly on the first different file:
when you're done reviewing these changes, close winmerge by a click at the right top, and the next different file will show up instantly.
further reading: another way of getting a fast overview of text file differences, using the cygwin "diff" command, can be found here.