Adding HGtk.exe log to Windows Context Menu

Update: 2/27/2011
Based on the comment added below, I realized that one can simply use the "Repository Explorer" option to view this same information. If you don't see this menu option when you right click a file, you can move it to your top-level context menu via the "Explorer Extension Settings." You can see this option if you right click in an empty area of the explorer window, and navigating to TortoiseHg -> Explorer Extension Settings. Then Adding "Repository Explorer" to your "Top menu items".

Using the "Open With Notepad" context menu registry change from the How to Geek, I added an "HGtk Log" command that is useful for displaying the log information of a file in your Mercurial repository.

Step 1, locate your TortoiseHG install directory, for me it is: "C:\Program Files (x86)\TortoiseHG\"

Step 2, Add a couple keys to your registry, from the How To Geek article, Navigate in the Registry to:

HKEY_CLASSES_ROOT\*\shell

Right-click on “shell” and choose to create a new key, calling it “whatever”. Create a new key below that one called “command”. Double-click on the (Default) value in the right-hand pane and enter in the following:
C:\Program Files (x86)\TortoiseHG\hgtk.exe log --nofork "%1"

EDIT: Adding the "--nofork" option to the hgtk.exe call. For some reason the hgtk program would not load files that had spaces in the path name if I didn't use the --nofork option.

I replaced "whatever" with "HG Log".

When complete, your registry should look like this:


Hg Log Registry Item

And your Context menu should have a new entry like this:

Hg Log Context Menu

And clicking on that will open the hgtk.exe Log window:

HgtkLog

Comments

in context

Hey, is this different from right clicking and selecting "Hg Repository Explorer"? Or have they recently updated tortoisehg?

Repository Explorer

You're right, looks like I missed simply clicking "Repository Explorer." From what I can tell, both methods call the exact same UI.

Maybe I had moved this option down into the sub-menu layer not realizing what it was. Thanks for bringing this to my attention.