P4D2::Ability to use a specific diff tool for a file

Create issue
Issue #259 open
Andreas Gobell created an issue

For the Mercurial CLI version I have a few external diff tools defined. It would be great to use a specific tool in MacHG depending on the file I want to diff. At the moment I need to switch the global diff tool in the preferences.

A possible solution would be to include a sub menu "Diff selected files with >" (and maybe "Diff all files with >") in the context menu of the browser in the "Differences View". This sub menu would contain the diff tools availible in the preferences and the ones defined via hgrc. Another solution would be to the define the diff tool depending on the file type.

My motivation for having this feature is that I do not only version control source code but also other files which benefit from an applicable application for diffing them. As an example I version control docx files. For this I have written an AppleScript which allows me to diff the documents directly in Microsoft Word. I would like to trigger this diff from MacHG.

Comments (2)

  1. Jason Harris repo owner
    • changed status to open

    Thanks for the report!

    I have wanted to have a general file type mapper to handle the open with, and now as you point out the diff with... Its not the top of the priority list at the moment. Note if you are already writing your own diff wrapper than you can use that to do the dispatching. Ie for .docx files it does one thing and it sends everything else to a different tool (say FileMerge) in fact that script might be interesting for others so if you write it can you send it through ? :)

    But in conclusion I understand your point here.., Patches are welcome if anyone wants to tackle this problem...

    Cheers, Jas

  2. Log in to comment