Saturday 16 June 2007

Launch TortoiseSVN from SQL 2005 Management Studio

Keep all your SQL scripts under version control?
Just saved a new SQL script to your projects working copy and want to commit it do you?



SQL Server Management Studio supports 'External Tools' which can have arguments and so on. Tortoise SVN can be configured to open a Commit dialogue for the working directory of a script file as follows:
Tools
External Tools
Add

Title: TortoiseSVN
Command: "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe"
Arguments: /command:commit /path:"$(ItemDir)" /notempfile

Then, if you want a toolbar shortcut:

Tools
Customize
Commands
Categories
Tools
External Command 1

Drag this onto a toolbar, and then right-click to edit properties.

Tidy.

References:
http://www.codeproject.com/useritems/SSMSScriptRunner.asp
http://www.sqldbatips.com/showarticle.asp?ID=78

No comments: