HOWTO: Set Visual Studio Code as the default Mercurial Merge Tool
Posted: 11/7/2022 11:08:40 AM
By: PrintableKanjiEmblem
Times Read: 1,823
0 Dislikes: 0
Topic: Reference

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:

[extensions]
extdiff = 

[ui]
merge = code 

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

[extdiff]
cmd.vsd = code
opts.vsd = --wait --diff
Rating: (You must be logged in to vote)
Discussion View:
Replies:

How to use VSCode's Three-way Merge Tool
Posted: 12/5/2022 3:37:50 PM
By: PrintableKanjiEmblem
Times Read: 666
0 Dislikes: 0
Topic: Reference

Also, if you've found this page, and are interested, but not sure how to use the new three-way merge tool, the following link goes into great detail as far as how to actually use the merge tool.

Finally Released: 3-Column Merge Editor in VS Code! | by Volodymyr Golosay | JavaScript in Plain English

[Note that the article author is using Git, but using the merge tool is exactly the same as with Hg] 

Rating: (You must be logged in to vote)