views:

5175

answers:

14

The options for source code diff viewing/editing/merging seem to be:

Free:

Commercial:

Are there any other options? (Wikipedia suggests a few)

What's your favorite tools for source code diff? And how does it differ from the ones in the list?


* Supports directory diffs

+4  A: 

I use meld.

codeape
+6  A: 

I use SourceGear DiffMerge, doesn't do anything awe inspiring (although the directory compare is quite nice) but I really like the interface for it.

Steven Robbins
And the colors/font styles are *much* easier on the eyes than the svn diff/merge...
GalacticCowboy
+2  A: 

I use WinMerge and have been very happy with it.

CompareIt is good as well, but non-free.

Mark Pim
+4  A: 

Also check out KDiff3

Conrad
+19  A: 
Igor Brejc
Winmerge is the best.
dr. evil
It doesn't seem to be as feature-full as Beyond Compare. Directory comparison is implemented in a weird way (without a split screen); can't compare files with different names (as a result of previous handicap); can't easily choose folder to compare, and then no option to selectively do a content comparison on subdirs. In short, after playing with it for a few minutes it seems that BC is more complete.
Assaf Lavie
Well I guess that's the difference between a commercial tool and a free one. If you really need the functionality of Beyond Compare, then it deserves its money.
Igor Brejc
A: 

There are plenty of diff tools around. I've search for one that runs on all three major plattforms (Linux, Mac, Windows) and found "DeltaWalker" from Deltopia.

The tool is based on eclipse and has all the bells and whistles you need at a normal developers day.

It's a commercial tool, but I think it is worth the money.

Mario Mueller
Playing around with it just now it seems much slower than the alternatives (probably because of Eclipse), and I also can't figure out the directory diff UI - when comparing two versions of the same directory it shows identical files and modified files in the same color (light green)... (-1)
Assaf Lavie
You might need to configure your tools correctly. The out-of-the-box config does not calculate the diff byte by byte and includes whitespace on comparison. You might find it useful to have a look at the settings?Talking about performance, it is correct, that DW is slower than other solutions, that run natively on a Windows OS using C++ or .NET (or on Linux using GTK or QT), but you can have it on all Java Plattforms ;) (Thats the point for me, as I own a Mac and work on Ubuntu on the job)
Mario Mueller
A: 

I use AJCDiff which I like a lot, not free but at $15 it's not exactly going to break the bank either. Reason I like it is that it can compare text, binaries, images and word docs. Doesn't do the directory thing mind you; horses for course I guess.

Shane MacLaughlin
+4  A: 

I really like Beyond Compare, it has a lot of nice features and is often very accurate.

Mark Sailes
A: 

I use WinDiff. It can compares folders or files as you want, but only one option at a time. This tool is enough for me.

jaloplo
+1  A: 

Diffuse is also free. It is the only tool I know of that does n-way merges (not limited to 2-way and 3-way merges). It also allows alignment to be manually overridden, has in-line editing, syntax highlighting, Unicode support, and easy keyboard navigation. It can also retrieve revisions of files directly from Bazaar, CVS, Darcs, Git, Mercurial, Monotone, Subversion, and SVK repositories.

+2  A: 

Beyond Compare is definitely a candidate to be tested if you are looking for to top of the line. From Scooter software

Tool
A: 

Been using ExamDiff for years on my PC.

I've just discovered Diffuse after installing Ubuntu 9.04 on a virtual machine, thinking about putting that on Windows as well now.

Alastair
+1  A: 

vimdiff

Doesn't do directory comparisons, but I have the full power of vi at my fingertips.

$ vim -d /etc/skel/.bashrc ~/.bashrc
  # ~/.bashrc: executed by bash(1) for »|  # ~/.bashrc: executed by bash(1) for»
  # see /usr/share/doc/bash/examples/st»|  # see /usr/share/doc/bash/examples/s»
  # for examples                        |  # for examples
                                        |
  --------------------------------------|  # Use Fink if it exists
  --------------------------------------|  root=/sw; [[ -d $root ]] && . $root/»
  --------------------------------------|
  # If not running interactively, don't»|  # If not running interactively, don'»
  [ -z "$PS1" ] && return               |  [ -z "$PS1" ] && return
                                        |
  # don't put duplicate lines in the hi»|  # don't put duplicate lines in the h»
  # don't overwrite GNU Midnight Comman»|  # don't overwrite GNU Midnight Comma»
  export HISTCONTROL=$HISTCONTROL${HIST»|  #export HISTCONTROL=$HISTCONTROL${HI»
  # ... or force ignoredups and ignores»|  # ... or force ignoredups and ignore»
  export HISTCONTROL=ignoreboth         |  export HISTCONTROL=ignoreboth
  --------------------------------------|  export HISTFILESIZE=50000
  --------------------------------------|  export HISTSIZE=50000
                                        |
  # append to the history file, don't o»|  # append to the history file, don't »
  shopt -s histappend                   |  shopt -s histappend
                                        |
  # for setting history length see HIST»|  # for setting history length see HIS»
/etc/skel/.bashrc [RO]1,1            Top .bashrc              1,1            Top
"~/.bashrc" 112L, 3478C
ephemient
A: 

How about using vim :P

http://blog.objectmentor.com/articles/2008/04/30/vim-as-a-diff-merge-tool

kitofr