Is possible to change the default diff tool in Mercurial?

后端 未结 4 873
[愿得一人]
[愿得一人] 2021-01-31 07:09

Every time I do an hg diff file.ext I end up using a console diff application. I would like to use Kdiff3 or WinMerge (I\'m using Windows).

Is there a way t

4条回答
  •  生来不讨喜
    2021-01-31 07:46

    If you are looking for something like git difftool, where you don't need to type the filenames and see the diff for all changed files, add these to your ~/.hgrc, and run hg difftool.

    [extensions]
    extdiff =
    
    [extdiff]
    cmd.vimdiff = vimdiff
    
    [alias]
    difftool = !for file in $(hg status -n); do hg vimdiff $file; done
    

    or for windows:

    [alias]
    difftool = !FOR /f %F IN ('hg status -nmar') DO hg vimdiff %F
    

提交回复
热议问题