hg merge and diff setting

I use hg to do SCM, then there is need to use diff and merge tools.

I prefer Kdiff3, it is the best merge tools.

If you setting the kdiff3 as its office website told.

you can change the .hgrc to make hg work with kdiff3

[extensions]
hgext.extdiff =

[extdiff]
cmd.kdiff3 =

[merge-tools]
kdiff3.args = $base $local $other -o $output
 

Mac


On Mac, kdiff3.app executable location is /Applications/kdiff3.app/Contents/MacOS/kdiff3. Make sure you add /Applications/kdiff3.app/Contents/MacOS to your $PATH, or create a symlink from a directory in your $PATH to /Applications/kdiff3.app/Contents/MacOS/kdiff3 (or create a wrapper script, or ...), if you want to invoke kdiff3 from command line or from Mercurial invoked from command line.

I create symlink at /usr/local/bin/kdiff3
It works fine



below is what I used on my mac os x

[extensions]
mq
=
bookmarks
=
alias 
=
graphlog 
=
;hgk 
=
imerge 
=
rebase 
=
patchbomb 
=
hgshelve
=/hgext2/hgshelve/hgshelve.py

[extdiff]
cmd.kdiff3 
=
cmd.opendiff 
= opendiff-w
;FileMerge
[merge
-tools]
kdiff3.args 
= $base $local $other -o $output

 

What is opendiff?

To use FileMerge with extdiff on Mac OS X, create the following shell script called opendiff-w somewhere in your $PATH (remember to make the script executable: chmod a+x opendiff-w):

# opendiff returns immediately, without waiting for FileMerge to exit.<br /># Piping the output makes opendiff wait for FileMerge.<br />opendiff "$@" | cat




posted on 2009-06-18 06:22  不是程序  阅读(637)  评论(0)    收藏  举报

导航