14

I'm looking for a tool that will take diff / debdiff output (and more specifically, the output of this script) and display the result of the comparison in a highly readable, graphical way. Any pointers would be appreciated.

Ideally, it would be the GTK+, FOSS equivalent of MDR.

Meld, Diffuse and similar software are not fit for this purpose, since they're intended to work standalone, and don't take input from stdin.

mgunes
  • 9,910

6 Answers6

8

Kompare can do this (and is the best GUI diff-viewer IMO):

./whatchanged package_name | kompare -

Note the '-' given as the input file argument. Most *nix programs have this interface to accept piped input, so you can probably use whichever one you like.

scottl
  • 2,588
4

If you only have a console, colordiff is a quite good solution.

To install it, run this command sudo apt-get install colordiff in a terminal

Anwar
  • 77,855
Mnementh
  • 307
2

I would use this simple script to use meld (or any of the other existing tools), that way you get a little bit of flexibility:

#!/bin/bash

TMPDIR=`mktemp -d`
DIFF_FILE=`mktemp`
TARGET='./'

cat /proc/$$/fd/0 > $DIFF_FILE
cd $TARGET
rsync -apvz --delete --stats --compress --progress $TARGET $TMPDIR
patch -R -p0 -d $TMPDIR < $DIFF_FILE
meld $TARGET $TMPDIR

Tested with meld and the output from bzr diff, so copied this into /usr/bin and chmod 755 and I did this:

bzr diff | meld-diff

The results show as expected.

2

I like using vim's internal syntax highlighting as a pager, so that I can view colorized diffs. For example, putting this in your .bashrc:

sudo apt-get install vim
alias vless='vim -u /usr/share/vim/vimcurrent/macros/less.vim'

(And then re-source your .bashrc with . ~/.bashrc.) Then you can run vless as your pager:

vless /path/to/your.diff

It's not graphical, but it is at least highlighted.

Kees Cook
  • 17,823
2

Although a KDE application it can be installed without TOO many dependencies, kdiff is an awesome diff editing / merge tool.

1

I know you are not ask for a diff tool integrated to a editor, but I'm sure you can avoid context switch (from editor to terminal, and back to editor) after learn a bit about what your editor can provides. Both, emacs and vim comes with diff tools.

  • For emacs case, you will use Ediff Mode (instaled by default). Look at this wiki page or consulting the official manual

  • Using emacs is simple, just type Alt + x and type ediff.

  • You can use ediff to browser difference beetween branches and revisions of your repository (bzr, git, svn, etc).

crncosta
  • 2,869