Use WinMerge as TortoiseHG Merge tool
Asked Answered
C

2

32

I am trying to set up WinMerge as the Merge tool into TortoiseHG; Here is my Mercurial.ini:

; User specific Mercurial config file.
; See the hgrc man page for details.

[ui]
username = Bargio <>
merge = winmergeu


[extdiff]
cmd.winmerge = C:\Program Files (x86)\WinMerge\WinMergeU.exe
opts.winmerge = /e /x /ub /wl

[merge-tools]
winmergeu.executable = C:\Program Files (x86)\WinMerge\WinMergeU.exe
winmergeu.priority= 1
winmergeu.fixeol=True
winmergeu.checkchanged=True
winmergeu.args= /e /ub /dl other /dr local $other $local $output
winmergeu.gui=False

[tortoisehg]
vdiff = winmerge

Visual diff works perfectly but when I try to merge two files, I get the following error:

tool winmergeu can't handle binary

How can I fix it?

Cheesecake answered 15/1, 2010 at 17:30 Comment(0)
A
14

You can add

winmergeu.binary=True

as found here if winmerge can merge binary files. If it can't you'll want to configure another merge tool that can and use matters to send the binary files to that tool.

Aegeus answered 16/1, 2010 at 5:1 Comment(2)
Thank you, pity that WinMerge cannot merge binary files (Actually can only visual diff various binary files with xdocdiff plugin).Cheesecake
If you find yourself using WinMerge for a few select extensions you can register it for just those extension using the [merge-patterns] section. Alternately you can map unmergeable binary extensions to "internal:fail" to be forced to pick one or the other.Aegeus
W
28

You no longer have to mess with the .ini file. As long as you have both TortoiseHG and WinMerge installed you will see it as an option in TortoiseHG Global Settings - TortoiseHG section - Three-way Merge Tool and Visual Diff Tool. It shows up as "winmergeu". Banged my head against the wall for a couple hours before I found this; I must be blind.

WinMerge 2.12.4.0 Unicode

TortoiseHg 2.5.1

Mercurial 2.3.2

Webfooted answered 19/10, 2012 at 18:38 Comment(0)
A
14

You can add

winmergeu.binary=True

as found here if winmerge can merge binary files. If it can't you'll want to configure another merge tool that can and use matters to send the binary files to that tool.

Aegeus answered 16/1, 2010 at 5:1 Comment(2)
Thank you, pity that WinMerge cannot merge binary files (Actually can only visual diff various binary files with xdocdiff plugin).Cheesecake
If you find yourself using WinMerge for a few select extensions you can register it for just those extension using the [merge-patterns] section. Alternately you can map unmergeable binary extensions to "internal:fail" to be forced to pick one or the other.Aegeus

© 2022 - 2024 — McMap. All rights reserved.