Friday, 27 September 2013

WinMerge Revisited - my default file and directory comparison tool

I seem to default to WinMerge for my file and directory comparisons.

Whenever I need to:

  • compare two directories
  • compare two files for differences
  • copy a set of files between directories
  • compare contents of zip files or rar files

When you install WinMerge:

  • You can choose to use it as the merge view in Tortoise SVN. I tend not to do this because the built in Tortoise SVN diff works fine for me. 
  • Add WinMerge to your system path, which allows you to call it from the command line easily and use the command line options. I choose this option.
  • Enable explorer context menu integration - an essential option.
Read the online documentation, or the help file.

When you install. Have a quick flick through the quick tour to get you up to speed quickly.

If you download the .zip file then you essentially have a portable install so can use it from a USB stick.

A few things I especially like:
  • You can drag and drop like a crazy man
    • drag and drop folders on to the desktop icon for comparison
    • drag and drop on to the main pane to start a compare
    • drag and drop into the input fields
  • If you install 7-zip and the7-zip plugin you can compare rar and zip files
    • 7-zip acts as my default archive management tool
A few things to note:
  • The tree mode makes life excellent, just make sure you enable it
  • Look through the options and switch on all the "Shell Integration" options - particularly the "Include subfolders by default"
Why would I use this?
  • I create a backup folder before testing. I test. I can compare and see what changed.
  • I want to revert back to previous files selectively, so I compare dirs and selectively move changed files
  • I have an oracle file and want to compare results
What do you use for your comparison tools? In built version control tools? Commercial tools? Leave a comment if you want to share your secret weapon of choice.


2 comments:

  1. I also depend on WinMerge a lot.

    One of the test automation techniques I use often is to have the test script dump information for each web page it visits in a text file for later analysis. That way, I end up with a folder of text files. Comparing this entire folder of information to a prior version of the same files is very easy to do with a tool like WinMerge.

    WinMerge give us two levels of blink tests - at the folder level, it quickly indicates which of the files in the current folder don't match the corresponding file in the baseline folder. Then, it allows us to drill down and compare the mismatched files themselves - providing a nice way to visualize the file differences.

    http://www.allthingsquality.com/2010/06/blink-tests-in-blink.html

    ReplyDelete
    Replies
    1. Thanks Joe.

      And I've just noticed that ZAP Proxy has a diff built in for 2 HTTP requests or responses.

      Delete