This blog post will show the steps to add a “View Revision History” context menu item to any right-click menu of Visual studio, first, add the command to the external tools list.

  1. Open Tools –> External Tools
  2. Click Add
  3. Enter a Title, Command: C:\Program Files\TortoiseHg\thg.exe
  4. Arguments: log $(ItemFilename)$(ItemExt)
  5. Initial Directory: $(ItemDir)


The Full List of External Tools available arguments is on MSDN.

To add this tools command to the context menu:

  1. Select Tools –> Customize
  2. Select the “Context Menu” radio button; and “Editor Context Menus | Code Window” from the drop down
  3. Click “Add Command…”
  4. Chose the “Tools” Category, and the External Command X; (where X is the position in the External Tools dialog where your command is located. The first position is 1, and increments down the multi-list display. In my example, it’s “External Command 3”)


5. Next you can click “Modify Selection” and give this command a meaningful name.


You now should have a new Context Menu Item when you right-click your code window: