Finally, I am getting around to an update to the TortoiseSVN Visual Studio Integration. The catalyst for this is the release of Visual Studio 2008 (formally codename Orcas) Beta 2, and making sure I can still play with Subversion through the IDE.
I have made a new distribution ZIP file with a few more configurations inside.
Download it here.
It has a few more features than before including some for dealing with conflicts. The distribution itself has a few more files so you can decide whether you want to just have the menus, toolbars or context menus.
Supported operations
The following Subversion/TortoiseSVN features are covered in the integration:
- Commit - Commit the files to the repository
- Update - Update the current working version
- History - Get the history for the selected file
- Diff - Get the diff compared to the base version
- Blame - Find out who committed the crimes in the file
- Revert - Undo changes
- Modifications - Check to see if any files have been modified
- Edit Conflicts - Edit the conflicts that arise from merging/updating
- Resolve - Mark the file as resolved for conflicts
- Repository - View the repository on the server
- Project History - Get the history of the entire project
- Add Solution - Add the solution being edited to source control
- Branch/Tag - Perform a branch or tag operation on the current working copy
- Settings - Set up TortoiseSVN
This simply installs a set of External Tools into Visual Studio for common TortoiseSVN operations. It can be installed on versions above Visual Studio.NET (version 7.0). Currently it is configured for Visual Studio 2008 (version 9.0), to make it work on other versions change the variable "strVisualStudioVersionNumber" as outlined in the file's comments.
Also, if you have installed TortoiseSVN in a non-default location, make sure that you change the variable "strTortoiseSVNBin" to the correct binary path. Make sure that the backslashes are doubled up.
SubversionMenu.vssettings
This is a settings file for Visual Studio 2008.
This adds a menu to the IDE for TortoiseSVN with the appropriate icons.
SubversionMenuToolbar.vssettings
This is a settings file for Visual Studio 2008.
This adds a menu for TortoiseSVN as well as a toolbar using the appropriate icons.
SubversionMenuToolbarContexts.vssettings
This is a settings file for Visual Studio 2008.
This adds not only the menu and toolbar, but also adds the items to the appropriate context menus for files and solutions.
SubversionMenuToolbarContextsVS2005.vssettings
This provides the menu, toolbar and context menus for TortoiseSVN in Visual Studio 2005.
Unfortunately there is no good solution for file renaming (I always do it through Windows Explorer) since this integration uses the External tools and allows for it to work in Visual Studio Express.
29 comments:
I wouldn't mind having an additional context menu for Commit/Update/etc for individual files/folders. I tried fixing it myself, but couldn't figure out how to refer to commands (or find the id for a command).
I've also started looking into a way of making solution explorer use overlay icons from Tortoise/Explorer, but VS extensibility isn't my area ;o)
So far I have found this integration to be very sweet ;o)
In order to have a commit/update for an individual file you would need to create a new commit/update command that uses $(ItemPath) and $(ItemDir). Then you can easily add these to the context menus.
Doing the icon overlay is not necessary for me as I use Check For Modifications infrequently. What I prefer about this integration is that it is a very thin layer wrapping the functionality that really does not get in the way. I never really care what I've edited or anything like that until I commit. I've changed the way I work with source control now in comparison to my days battling with VSS, it is actually almost a case of I don't need to even think about the source control.
If you want a more comprehensive VSS style integration I recommend having a look at AnkhSVN:
http://ankhsvn.tigris.org/
This could also give you a hint at how to do icon overlays ;)
I have no problems creating the additional external tools for item Commit/Update, but am at a loss on how to assosiate them with the context menu. The only thing missing is the actual ID for the command. I could copy and paste the rest in the settings.
Personally I use Tortoise directly from Explorer, however, I have coworkers who are more into the good old VSS UI and would like the icon overlays. I downloaded the Ankh source yesterday and skimmed through the filenames looking for a n instant clue where to look for the overlays, but didn't have the time to look more into it. I guess figuring it out when I have the time shouldn't cause too much trouble creating a simple addin with the functionality of using the correct overlay.
However, I like the simplicity of the integration (no coding) and expect to use it frequently.
Thank you for your work so far.
Sorry, forgot to say how to add it to the context menus.
Right click on the toolbars backgrounds and select "Customize". From the list in the toolbars tick "Context Menus" - this option is hidden when not in Customize mode.
From the new toolbar select "Project and Solution Context Menus". The "Item" context menu is for an individual file, and the "Solution" is for the solution. You can probably ignore the rest.
To add one of the external tools you need to know which External Tools number maps to the TortoiseSVN command - you can see this in "Customize" mode when looking at the "Tools" menu. On the "Commands" tab on the "Customize" dialog select "Tools" then drag the items named External Command (number) to the menu/toolbar.
Hope this helps.
Cheers for posting these settings, you have made my life much easier :)
I have just nixed VSS in our predominately MS shop, so this gives us another option of SVN integration in Visual Studio. Thanks again
Awesome contribution. Thanks for your efforts. Huge dev workflow improvement.
Dear Garry,
I've been installed all settings and the vbs, because my opetrational system is in portuguese i change the "program files" to "Arquivos de programas" in the script vbs and the settings file.
BUT there isnt working, all icons are disabled and the menus too! any idea to help me ??
Hello jorge,
I've tried opening the settings file in wordpad, i've found out that the related directories is hard coded as "c:\\program files\\"... What I did is I replaced the directory string into the target directory of tortoise SVN, and it just works fine. Hope this helps.
Garry,
I quickly tested it and it looks great! Very light-weight and usable. It's missing branch/tag and a few lesser used items but I can deal with these externally. Thanks for making this available.
Hi there - how would you uninstall this?
Cheers
Ian
Regarding uninstalling: Clean out regedit at
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\"
\External Tools\
Commercial alternative: VisualSVN (www.visualsvn.com)
In the screenshot, it displays a separate toolbar for Subversion. When I installed this, however, it just dropped all of the options into the pre-existing Tools toolbar, in a rather unattractive manner. Did I do something wrong, or is there an easy fix for this? Thanks.
hi
i am install it in visual studio 9.0
i want to know that why commit,update and some important options are not enable in subversion menu and also toolbar
jayant
I installed your setting files and also installed tortoiseSVN but i can add the solution to the repository, i can't commit the solution. It gives me this error "C:\Documents and Settings\gilbert\Belgelerim\Visual Studio 2008\Projects\denemeninkrali is no a working copy. Can't open file: C:\Documents and Settings\gilbert\Belgelerim\Visual Studio 2008\Projects\denemeninkrali\.svn\entries: System cannot find the path". So i checked the document over and over to make sure if i make something wrong but everything was ok. What should i do now?
Hi, I have small problem. External tools working fine but in VS 2005 Commit from Subversion menu runs dotfuscator? What can be a reason?
thx, good article
ASP.NET C# .Net Framework
This is exactly what I was hoping to find! Thank you for sharing your work!!
Hi,
Thanks - That's (also for me) what i've bee searchimg for...
There is only a simple suggestion for the VBS-Script:
If you use %ProgramFiles% at Line 15 the Script can be used without any modifications in non-english Win-Installations...
Ok. this looks like a good alternative to VSS but am a little stuck...
Am setting up a LAN environment, the TortoiseSVN in on another machine.
I mapped the tortoisesvn to a local drive and chaged the path accordingly but all i have is grayed out menus...and all of them are a premade menu, kind of cluttering things. Can someone help me?
For the guys that have this working, has anyone tried a LAN setting?
I'm pretty sure you must have TortoiseSVN installed on the same machine you're running Visual Studio from.
I use SSH over the network without any problems.
Would you be able to write better installation steps? As you say what the files are but not how to actually install it.
What do I do with the .vbs? does it need to go into a project? Why not put it together more, even an exe would be better.
Cheers
Andrew
Gary, thanks for your work. On start up, I still get the error,
"The project MyProject.vcproj appears to be under source control, but the associated source control plug-in is not installed on this computer. Source control will be disabled for this project."
Even though the toolbar seems to work. Can you help me understand why that might be? I installed the seetings for VS2005. Thanks!!
Hello, regarding uninstall, editing the registry is a pain and not simple in this case, I end up with 21 grayed out menu items 'External command' in Vs2008 in the Tools menu. Would be absolutely great if you could include an uninstall script.
Would also be nice if the svn commands could be grouped into a submenu.
Great approach anyway :)
2 cents
Hey
Bluehorse uninstall is not that difficult after removing all the registry you must set ToolNumKeys=2 you will find this in External tools only.
This means no need to remove registry entry just keep playing with the ToolNumKeys.
:)
So, how do I install those vsetting files in VS??
Any way to get this to install into Visual Web Developer Express Edition 2008?
Post a Comment