#68 TortoiseHG integration

Kimmo Varis

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?


  • Kimmo Varis

    Kimmo Varis - 2008-10-24

    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.

  • Kimmo Varis

    Kimmo Varis - 2008-11-02

    But I don't have time to look at this in near future..

  • TK Soh

    TK Soh - 2008-11-14

    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?

  • Kimmo Varis

    Kimmo Varis - 2008-11-14

    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.

  • TK Soh

    TK Soh - 2008-12-19

    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:

    kdiff3.args=-L1 base --L2 local --L3 other $base $local $other -o $output

  • TK Soh

    TK Soh - 2008-12-20

    I've created the recipe below based on the one on Mercurial wiki:

    winmergeu.regkey=Software\Thingamahoochie\WinMerge\ winmergeu.regname=Executable
    winmergeu.args=/e /ub /dl other /dr local $other $local $output

    It appeared to work with WinMerge latest release, 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.

  • Kimmo Varis

    Kimmo Varis - 2008-12-21

    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?

  • TK Soh

    TK Soh - 2008-12-22

    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.

  • Kimmo Varis

    Kimmo Varis - 2009-03-22

    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!

  • Kimmo Varis

    Kimmo Varis - 2009-03-22
    • status: open --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks