Take the 2-minute tour ×

I decided to try to contribute Firefox development, and they use Mercurial for source control. In the documentation about using Mercurial it was advised to choose a diff program and to do it before you start coding. They list a bunch of options, one of which appears to be the standard Unix/Linux diff program, which I'm somewhat familiar with via basic use.

The thing is, I hadn't realized that the diff program can even be an issue and I have a feeling that I won't know how to pick one until I pick the wrong one and get screwed by it somehow. So to skip this unnecessary hurdle, I'd like to ask what should I look at when choosing a diff program, and in what cases is the choice important (and in what way)?

share|improve this question

3 Answers 3

up vote 6 down vote accepted

You want a program that can display differences and navigate between them quickly and easily. If you're using it with a VCS, especially a DVCS like Mercurial, you'll want built-in merge support as well.

I'd recommend Beyond Compare. It's intuitive and easy to use, they've got versions for Windows and Linux, and the Pro version (which doesn't cost all that much) has a very useful three-way merge feature.

share|improve this answer

For me personally, I've used two different programs, kdiff3 and p4merge. I believe they both run off the unix diff. In my limited experience, you can't really go wrong with either of these diff programs as they have always produced identical results for me. The main factor is personal preference. The program kdiff3 is more configurable, but I prefer p4merge when I am actually merging files (kdiff3 requires an additional step to start merging). p4merge has a little bit better looking interface.

share|improve this answer

I'm a fan of Meld. I never thought I'd move to a gui diff util until Meld came along. It's simple, supports diffing many things (revisions, directories, files, etc), can do two-way or three-way diffs, and makes manually merging files a breeze.

share|improve this answer

Your Answer


