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.
- Open Tools –> External Tools
- Click Add
- Enter a Title, Command: C:\Program Files\TortoiseHg\thg.exe
- Arguments: log $(ItemFilename)$(ItemExt)
- Initial Directory: $(ItemDir)
The Full List of External Tools available arguments is on MSDN.
To add this tools command to the context menu:
- Select Tools –> Customize
- Select the “Context Menu” radio button; and “Editor Context Menus | Code Window” from the drop down
- Click “Add Command…”
- 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: