Friday, June 24, 2011

Commit using shortcut key in TortoiseSVN (Windows)

I always needed to automate committing in TortoiseSVN. Sure, it was not a very big deal to right click a folder/file and click commit but still how awesome would it be if I just use a shortcut key?

This led me to to this stackoverflow question which basically leads to this article. Cool! Just what I wanted!
Well, not quite. It does show that we should call TortoiseProc.exe with the required parameters, but acquiring the parameters (selected folder/file) in Windows Explorer is the tricky part. Not to mention, that it should happen when a shortcut key is pressed.

Well the whole process was surprisingly easy, thanks to QTTabBar. QTTabBar is one awesome piece of software which enables, tabbed browsing for Windows Explorer which is its major feature. Plus, it has a plethora of other goodies which makes Explorer down right lame.

Take a look at those lovely Tabs!


So the feature that we are going to use is "Applications".

Once QTTabBar is installed, right click on the bar, and select Options.

From Options, go to the Applications tab.

Then from there, select the button to your top right (the one without the folder icon). Type a name "Commit"

From there, set the options as follows.

1. The path should be of course where you installed TortoiseSVN.
2. Leave the arguments as it is, unless you know what other arguments you need to pass in.
3. Assign a shortcut key and presto!

C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
/command:commit /path:%s%

Here is another shortcut I created for Update.

/command:update /path:%s%

This is just the beginning, you can do MUCH more than this using the article I specified earlier.

And the fun doesn't stop there... You can automate just about ANYTHING that accepts parameters, using shortcut keys now!

Happy Committing!

No comments:

Post a Comment