First, you'll need to make the following into a script. I named it "ediff3":
if [ $# -ne 3 ]; then
echo Usage: $0 local base other
emacs --eval '(ediff-merge-with-ancestor "'$1'" "'$2'" "'$3'")'
Don't forget to set that script executable!
Next up, you'll need to tell Mercurial how to call your new ediff3 script. Edit $HOME/.hgrc, and add the following lines:
merge = ediff3
ediff3.executable = ediff3
ediff3.args = $local $other $base
You're now done with configuration. This blog post over here told me how to actually use ediff3. All in all, I'm pretty pleased. It was quick, easy to learn, easy to use, and did what I needed. If only all the tools I ever needed were like that.