Posts tagged ‘merge’

Three-way merge for hg using vim

I accidentally blew away my .hgrc and it took me some time to recover my 3-way merge inspired by Dan McGee’s article on the subject. So for my and your future reference here’s what you need in your .hgrc to get hg merge to give you a three merge window in vim:

merge = vimdiff

vimdiff.executable = vim
vimdiff.args = -f -d -c "wincmd J" "$output" "$local" "$base" "$other"

When running hg merge, the effect you get is best described by Dan McGee himself:

The end result is three panes along the top (local, base, and remote respectively), and the merge work-in-progress is on the bottom. In addition, all four panes are still locked together for scrolling.