Setting up Tortoise SVN Windows 7 hotkeys

Sint picture Sint · Feb 22, 2011 · Viewed 8.1k times · Source

How would one go about setting up some hotkeys for commonly used SVN actions such as diff?

Currently to view diff, I have to select file(s), then right click, navigate to TortoiseSVN and then select Diff action. Quite a few steps for something used often.

Instead, I would like to select file and use hotkey(for example Ctrl-Alt-F) to do the same Diff action.

Searching for solutions, I have found some people running AutoHotKey scripts to do similar things, but it seems like an overkill.

I made a hotkey shortcut(using standard Win 7 method of creating a shortcut then adjusting its properties) to run TortoiseMerge, which is the tool that displays the diff, but such a shortcut ignores current file selection and brings up a blank TortoiseMerge.

Any ideas to try?

Answer

splash picture splash · Feb 22, 2011

You can modify the TortoiseSVN context menu and place your favorite commands at the root of the context menu. This way you have only to click twice for a diff. Not that much, I think.

TortoiseSVN Settings - Context Menu

Another option would be to use an advanced file manager (like Total Commander or FreeCommander) which enables you to define custom menu commands with custom hot keys.

In Total Commander this would be "Change Start Menu":

  • Command: C:\Program Files (x86)\TortoiseSVN\bin\TortoiseProc.exe
  • Parameters: /command:diff /path:%P\%N
  • Shortcut Key: CRTL+ALT+F1

Whether shell context menu or hotkey, you need at least 2 steps to run a TortoiseSVN command:

  1. Select the file (selecting and right clicking to open the context menu is a single action)
  2. Run the command (click on the context menu item or press the shortcut key)

From this point of view it's just a question of your personal preference: should I click twice or should I click once and leave the mouse for pressing a key? ;-)