Issue #2410 closed

Merge tools are not detected on Mac OS X

Ken Mason
created an issue

When running TortoiseHg on OS X, when going to Settings (either Global or repository-specific), the dropdowns for "Three-way Merge Tool" and "Visual Diff Tool" are both empty, even when there are merge / diff tools available on the box, installed in the standard location (the /Applications folder).

From reviewing the source code in TortoiseHg and hglib itself, it looks like this is only built to work for Windows. It appears it uses paths and registry settings that are windows specific to discover tools, and doesn't appear to have any support for mac/linux paths / locations.

TortoiseHg/Hglib should support the detection of diff/merge tools on non-Windows platforms.

Comments (5)

  1. Steve Borho

    The way this works on Linux and Mac OS X is the diff/merge tools have to be available in your $PATH, and you have to %include the mergetools.rc from the contrib/ folder of the thg repository from your .hgrc file.

  2. Ken Mason reporter

    I know that you don't officially support the Mac client yet (as evidenced that you have to jump through hoops with Homebrew / etc to get it installed), but if you want Hg (and TortoiseHg by extension) to be a first-class citizen on the Mac, I'd humbly suggest this is worth addressing. Having to massage your path or include other files into your hgrc is beyond what I'd think is reasonably expected when working with any VCS. The auto-discovery on Windows makes 3rd party tools easy to hook up to; it should be that easy on Mac / Linux, too, as long as things are installed in their standard paths.

    Also, since HG GUIs such as Sourcetree can do this, it seems to indicate that THG could do it, too.

    Indeed as you commented, this is the way that hglib seems to work, based on the code I saw. Since this is more of a UI concern, it seemed more appropriate to start with a ticket here, and let you open a corresponding ticket in hglib, if necessary. Apologies if this ticket is in the wrong project.

    Do you expect this is something you'll address?

  3. Steve Borho

    this is the kind of detail an installer would resolve. it would install a Mac oriented mergetools.rc into a location where Mercurial would automatically find it. This is how it works on Windows. On Linux, the Mercurial packages typically install a mergetools.rc file that discovers tools in $PATH.

  4. Log in to comment