Vaibhav Bajpai | Blog

Mercurial diffs with Mac OS X FileMerge

24 June 2011

Create opendiff-w script in /usr/bin:

# opendiff returns immediately, without waiting for FileMerge to exit.
# Piping the output makes opendiff wait for FileMerge.
opendiff "[email protected]" | cat

Give execute permissions to the script: $ chmod +x /usr/bin/opendiff-w

Edit ~/.hgrc

hgext.extdiff = 

cmd.interdiff = hg-interdiff
cmd.opendiff = opendiff-w

filemerge.executable = opendiff-w
filemerge.args = $local $other -ancestor $base -merge $output         

Add a function for hg opendiff in your .zshrc

hgd () {
	hg opendiff $1

Diff using hgd()

$ hgd $file
Fork me on GitHub