Branching With TortoiseHG Using BeyondCompare

Using BeyondCompare with TortoiseHG, but can’t remember which file is which branch? Wish BeyondCompare would always show if there are changes to a file on both branches, even if they’re aren’t line conflicts? Then the following setting will help.

By default, TortoiseHG is passing \automerge to BeyondCompare (assuming you’ve chosen the built-in beyondcompare3 option for merging). To see the settings, look in the MergeTools.rc file in the hgrc.d directory of the THG install directory.

In your mercurial.ini file, add the following lines:
[merge-tools]
beyondcompare3.args = “/lefttitle=working directory” “/righttitle=branch being merged in” “/centertitle=common parent” /outputtitle=$output /ro /solo $local $other $base $output

Now, if you select Tool Resolve, BeyondCompare will always appear. It will have done it’s best to merge, but you can review it’s decisions.

The left pane will have the title ‘working directory’, the center and right will have the titles as listed above in the options.

The bottom (merge) panel will now always show the output file name, rather than you having to click in one of the filename areas to find out what file you’re actually modifying.

One thing to keep in mind. If you’re using rebase, working directory and branch will be reversed. i.e. the pane titled ‘branch being merged in’ is actually your working directory and vice versa. I’m not aware of a way to change this, and if you read up on what rebase is doing ‘behind the scenes’, this behaviour makes sense, but it can still be confusing if you don’t know ahead of time.

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply