How do I configure TortoiseHg to open a file in the right program based on its extension?
Asked Answered
S

1

12

I'm using TortoiseHg v2.2.1 with Mercurial 1.9 in WindowsXP. How do I configure TortoiseHg to view a file based on the application Windows has associated with its extension?

For example, if I have a .docx file in the repository and I'm looking at its revision history, I'd like View at revision... to open the selected revision in MS Word. Likewise for other binary file types like ppt and xls, which I can't view using the default text editor or kdiff3.

Can I leverage that Windows already knows what program to use to open certain types of files or will I have to manually configure each file type of interest within the Tortoise config files?

I've found several SVN scripts in the TortoiseHg\diff-scripts folder that look like they solve a similar problem for diffing binaries rather than simply viewing them, but those don't seem to be activated and I'm not sure what if anything I need to mod in the MergePatterns.rc or Mercurial.ini files to make this all work.

Sutlej answered 21/9, 2011 at 21:29 Comment(1)
check thisUropod
U
2

To make "View at Revision" use whatever program is associated with the file's extension, try this trick: In the "Global Settings" in the "TortoiseHg" section, enter start "" as "Visual Editor". Note the empty "". This is necessary so that start will not use the file name, which gets passed in quotes by TortoiseHg, as the window title.

Unbelief answered 13/10, 2013 at 12:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.