Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring Mercurial - FileMerge for Apple Mac OS X

Tags:

How do I configure Apple's FileMerge program to function as Mercurial's merge tool? I have my .hgrc file setup in my home directory and I simply want to configure FileMerge as the merge program.

like image 850
Frank V Avatar asked Aug 20 '09 05:08

Frank V


1 Answers

As described in the hg wiki, this has worked for me with various versions of hg:

  • Create a script somewhere in your $PATH, say in /usr/local/bin:
$ vim /usr/local/bin/opendiff-w  #!/bin/sh # opendiff returns immediately, without waiting for FileMerge to exit. # Piping the output makes opendiff wait for FileMerge. opendiff "$@" | cat 
  • Add the following sections to your ~/.hgrc:
[extdiff] cmd.interdiff = hg-interdiff cmd.opendiff = opendiff-w  [merge-tools] filemerge.executable = opendiff-w filemerge.args = $local $other -ancestor $base -merge $output  [extensions] extdiff =  

Now you can use it as $hg opendiff.

like image 93
Ned Deily Avatar answered Dec 15 '22 13:12

Ned Deily