View Light

HOWTO: Set Visual Studio Code as the default Mercurial Merge Tool

As of VSCode 1.69, it has an excellent three-pane merge tool on par with the GitKraken and Beyond Compare merge tools. Here's how to configure Hg to use it (In Linux anyway, for other OS's you will have to keep searching...)

I'm pretty new to Mercurial, being totally used to Git and GitKraken, so I've been a little lost with handling merges as most Linux-based merge tools make no sense to me as far as understanding how to work with their UI. (kdiff, meld, vimdiff all are off on another planet as far as what I'm used to.)

So happily I found this article (Using VS Code for merges in Mercurial) explaining just how to do that.

It has additional info that you will find useful, but I wanted to capture the basics just in case the article goes away.

Base changes needed in your ~/.hgrc file:

extdiff = 

merge = code 

code.priority = 100
code.premerge = True
code.args = --wait --merge $other $local $base $output 

cmd.vsd = code
opts.vsd = --wait --diff
Rating: (You must be logged in to vote)
12/5/2022 3:37:50 PM
0 Dislikes: 0