TortoiseHG (http://tortoisehg.sourceforge.net/) is a Windows GUI for Mercurial.
Things to do:
- figure out how to setup WinMerge as diff/merge tool. Is it some registry value or what?
- which kind of command line is required/expected?
Looked at this shortly. It appears that TortoiseHG uses .ini files to configure things. And they even have several tools configured in default ini file. But WinMerge is missing. So I think the first thing is to submit a patch for TortoiseHG project to add WinMerge.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually Mercurial uses [mercurial.ini] to configure things, TortoiseHg just inherit the behavior as a client of it.
The recipe posted by johansend should work for adding support of winmerge into TortoiseHg. Or by submitting patch to add winmerge, you are talking about bundling winmerge in TortoiseHg installer?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes. WinMerge installer already detects TortoiseCVS and TortoiseSVN and sets up itself as a compare tool for them. It would be nice to do same for TortoiseHG. For TortoiseCVS and TortoiseSVN we can find the info from Registry and just set couple of values to "integrate".
This is from WinMerge project point of view. If someone wants to add WinMerge to some set of all-in-one setup/tools I've nothing against it of course, but I'm not doing it.
By patching I meant that if possible it would be nice if Mercurial/TortoiseHG also could detect WinMerge and support it. For TortoiseCVS and TortoiseSVN setting compare/merge tool means setting command line to call in options-dialog. With TortoiseHG I simply could not figure out what to do and where. I was in hurry so I gave up fast though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We are preparing the next release of TortoiseHg. If you can provide the merge-tool setting to support winmerge, perhaps I can add it into the default mercurial.ini, so Mercurial will pick it up if it's installed.
Here's a sample merge-tool settings for kdiff3:
[merge-tools]
kdiff3.priority=-1
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output
kdiff3.regkey=Software\KDiff3
kdiff3.regappend=\kdiff3.exe
kdiff3.fixeol=True
kdiff3.gui=True
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've created the recipe below based on the one on Mercurial wiki:
winmergeu.regkey=Software\Thingamahoochie\WinMerge\
winmergeu.regname=Executable
winmergeu.priority=-10
winmergeu.args=/e /ub /dl other /dr local $other $local $output
winmergeu.fixeol=True
winmergeu.gui=True
It appeared to work with WinMerge latest release 2.10.2.0, but I'd like to confirm if the registry settings are okay for older releases too. Also, I don't see the "/ub" option in WinMerge's help doc. Maybe an undocumented feature?
In any case, that just merge-tool. I'll still need to make TortoiseHg detects and use the difftool installed, probably using the similar logic as merge-tool.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The 'fixeol' setting is not documented on mercurial wiki, but per mercurial source file, it "Convert EOL markers in a file to match origfile". Sounds a little worrisome to me, so I am going to take it out.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looked at this shortly. It appears that TortoiseHG uses .ini files to configure things. And they even have several tools configured in default ini file. But WinMerge is missing. So I think the first thing is to submit a patch for TortoiseHG project to add WinMerge.
But I don't have time to look at this in near future..
Mercurial has a page outlining how to configure merge tools ( http://www.selenic.com/mercurial/wiki/index.cgi/MergeToolConfiguration ), but I was unable to get WinMerge to work for visual diffs using this. However, I was able to get WinMerge to work using ExtDiff extenstion ( http://www.selenic.com/mercurial/wiki/index.cgi/ExtdiffExtension ).
The text that I added to the mercurial.ini file was as follows:
[extensions]
hgext.extdiff=
[extdiff]
cmd.vdiff = C:\Program Files\WinMerge\WinMerge.exe
opts.vdiff = /e /x /ub /wl
Actually Mercurial uses [mercurial.ini] to configure things, TortoiseHg just inherit the behavior as a client of it.
The recipe posted by johansend should work for adding support of winmerge into TortoiseHg. Or by submitting patch to add winmerge, you are talking about bundling winmerge in TortoiseHg installer?
According to this post ( http://kimmov.wordpress.com/2008/10/23/tortoisehg-and-winmerge/ ), the goal is to allow the WinMerge installer to set WinMerge as the diff program for Mercurial, not to have it bundled with TortoiseHg.
Yes. WinMerge installer already detects TortoiseCVS and TortoiseSVN and sets up itself as a compare tool for them. It would be nice to do same for TortoiseHG. For TortoiseCVS and TortoiseSVN we can find the info from Registry and just set couple of values to "integrate".
This is from WinMerge project point of view. If someone wants to add WinMerge to some set of all-in-one setup/tools I've nothing against it of course, but I'm not doing it.
By patching I meant that if possible it would be nice if Mercurial/TortoiseHG also could detect WinMerge and support it. For TortoiseCVS and TortoiseSVN setting compare/merge tool means setting command line to call in options-dialog. With TortoiseHG I simply could not figure out what to do and where. I was in hurry so I gave up fast though.
We are preparing the next release of TortoiseHg. If you can provide the merge-tool setting to support winmerge, perhaps I can add it into the default mercurial.ini, so Mercurial will pick it up if it's installed.
Here's a sample merge-tool settings for kdiff3:
[merge-tools]
kdiff3.priority=-1
kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output
kdiff3.regkey=Software\KDiff3
kdiff3.regappend=\kdiff3.exe
kdiff3.fixeol=True
kdiff3.gui=True
This page was added to Mercurial Wiki (not by me):
http://www.selenic.com/mercurial/wiki/index.cgi/WinMerge
I haven't checked those settings myself, but at least the WinMerge command line looks to be OK.
I've created the recipe below based on the one on Mercurial wiki:
winmergeu.regkey=Software\Thingamahoochie\WinMerge\
winmergeu.regname=Executable
winmergeu.priority=-10
winmergeu.args=/e /ub /dl other /dr local $other $local $output
winmergeu.fixeol=True
winmergeu.gui=True
It appeared to work with WinMerge latest release 2.10.2.0, but I'd like to confirm if the registry settings are okay for older releases too. Also, I don't see the "/ub" option in WinMerge's help doc. Maybe an undocumented feature?
In any case, that just merge-tool. I'll still need to make TortoiseHg detects and use the difftool installed, probably using the similar logic as merge-tool.
Looks ok.
/ub is deprecated in latest versions. /u replaces it. But for compatibility with earlier versions it is safe to use /ub.
Btw, what is that xxx.fixeol setting? WinMerge handles different EOL types just fine, but does mercurial require something special here?
In that case I will keep the /ub option then.
The 'fixeol' setting is not documented on mercurial wiki, but per mercurial source file, it "Convert EOL markers in a file to match origfile". Sounds a little worrisome to me, so I am going to take it out.
I finally had a time to install and test latest TortoiseHG version. And now 'winmergeu' is there as a selection for merge tool.
So I'm closing this item as fixed. Thanks!