blog.vorpal.cc

Hi! My name is David Hogue. I write code in Bend, Oregon.

August 16, 2006

TortoiseSVN in Visual Studio

Filed under: — David @ 7:44 pm

Update October 2 2007: Someone posted a link to Gary’s Bit Patterns where there is a settings file you can just import instead of doing all these manual steps.

I also fixed the quotes in the commands so they shouldn’t cause trouble anymore.


Ever wanted to use TortoiseSVN from VisualStudio? Well, now you can! 1

Contents

  1. Introduction
  2. Menu
  3. Toolbar
  4. Icons
  5. Done

Introduction

I have created a toolbar with Update, Log, Check, Revert, and Commit tortoise toolbar. The commands work the same as if you right clicked the folder containing the solution. Follow the steps below to get your own tortoise toolbar.

Menu

Select Tools > External Tools… from the Visual Studio menu. Add a tool using the following info.

adding tortoise to the menu

Field Value
#1  
Title Tortoise &Update
Command C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments /command:update /path:"$(SolutionDir)" /notempfile
#2  
Title Tortoise &Log
Command C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments /command:log /path:"$(SolutionDir)" /notempfile
#3  
Title Tortoise Check for &Modifications
Command C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments /command:repostatus /path:"$(SolutionDir)" /notempfile
#4  
Title Tortoise Re&vert
Command C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments /command:revert /path:"$(SolutionDir)" /notempfile
#5  
Title Tortoise &Commit
Command C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
Arguments /command:commit /path:"$(SolutionDir)" /notempfile
  • $(SolutionDir) is the path to the directory the solution is in
  • /notempfile is required when running from the command line
  • The ampersands make that letter a shortcut for use in the menu

You should have the commands in your tools menu. Try them out and make sure they all work.

tools menu with tortoise commands

Toolbar

Add the toolbar by right-clicking your toolbar and select customize. Make a new toolbar and call it Tortoise. Close the customize window and right-click again, this time adding the tortoise toolbar.

Now go back to customize, select the commands tab, and scroll down to the tools category. You should see a bunch of commands like External Command 1, External Command 2, etc. Drag those on to your new toolbar. This may require some trial and error.

You can rename the commands in the toolbar by selecting a button with the customize window open, then clicking the Modify Selection button, then Name:.

changing the toolbar names

Icons

Now to add the icons. I haven’t found an easy way to do this yet. Here’s what I did:

Go to http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/Resources/ (user guest, blank password). Browse to the image you want then right click the image and select Copy Image (note: this was on Firefox). With the customize window open right click the button and select Paste Button Image.

The pasted image won’t be transparent, so you need to edit the image. Right-click and select Edit Button Image. Then erase all the black area.

erasing the transparent part of the icons

Done

Your toolbar should look something like this: tortoise toolbar


  1. Well, you could have before if you wanted. I’m sure I’m not the first to come up with this. I know a few people already do this because it came up on the TortoiseSVN mailing list a while back.

kick it on DotNetKicks.com

29 Responses to “TortoiseSVN in Visual Studio”

  1. Subversion and Visual Studio…

  2. Subversion Toolbar for Visual Studio…

    The folks at vorpal have put together a nice post about how to create a custom SVN toolbar inside of……

  3. TortoiseSVN in Visual Studio…

    You’ve been kicked (a good thing) – Trackback from DotNetKicks.com…

  4. Tortise Toolbar in Visual Studio…

  5. The server was down overnight due to some maintenance replacing a UPS. After the replacement I forgot to turn the box back on. Anyway, it’s back up now.

    Sorry about the downtime.

  6. or you could use this addin that works kind of like SourceSafe. http://ankhsvn.tigris.org/

  7. Yeah, I used ankhsvn a while ago (over a year ago now). It had enough quirks back then that I stopped using it. I’ll give ankh another try once it reaches 1.0.

    Plus, I just love Tortoise. It’s a very high quality project with frequent updates and improvements. Even the nightly releases I’ve tried are amazingly stable and usable.

  8. Subversion en Windows…

    Subversion es un sistema para el control de codigo fuente, es decir ayuda al manejo y control de control…

  9. I have a tip. If you follow the link to the TortoiseSVN repository on Tigris to get the icons, you will get the latest icons. If you have an earlier version of the program the icons might be different. But you can find the icons for your version in the tags folder of the repository.

    Also, Visual Studio 2005 could help by naming the external commands in the commands tab for toolbar customization (instead of external command 1 to 25).

  10. Links – 2006-10-06…

    Turn on auto HTML attribute quotes in 2005
    Visual Studio Code Snippets for ASP.NET developers; view……

  11. Great! I did it in MS Visual Studio 2003.
    A little modification in external commands:

    Title Tortoise &Update
    Command C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
    Arguments /command:update /path:”$(SolutionDir)” /notempfile

    I should removed the quotation marks to make the commands to execute:

    Arguments /command:update /path:$(SolutionDir) /notempfile

  12. http://article.gmane.org/gmane.comp.version-control.subversion.tortoisesvn.user/5290

  13. sir here i want to use tortoise as a client and cvs as server …and i need to communicate through the asp.net application to client and server
    give me the code../API to communicate server and client

  14. Anonymous Says:

    I am interested in reading your article, but I have a problem viewing this site.
    The menu type area on the left is covering up the left side of the article.
    The maroon “menu” box is inside the gray “article contents” box. I am using IE 6.0.2900.2180.

  15. Garry Bit has something very similar: http://garrys-brain.blogspot.com/2006/11/visual-studio-2005-and-tortoisesvn.html

  16. Sunil: Sir, use TortoiseCVS instead TortoiseSVN, that is your code

  17. Regarding jwalker’s comment above: The quotation marks are indeed necessary if your solution path contains spaces. The problem is that when copying/pasting the commands in the blog post, the quotation marks are not in the correct format. Simply replace them with the standard quotation marks.

  18. How to get lock, release lock for a file using SVN in Visual Studio 2005

  19. [...] En muchas ocasiones, por cuestiones de tiempo, dinero, recursos …, no tenemos la oportunidad de montar un TFS. Aún más, si simplemente queremos un control de código para organizarnos un poquito, tal vez nos esté sobrando con algo más sencillo. Concretamente, en mi caso, quería trabajar con unos compañeros en un proyecto subido en Code Google, el cual da un servicio de repositorio gratuito para proyectos open source. ¿Y cómo conectamos Visual Studio con dicho respositorio para ahorrarnos trabajo?. La solución es integrar un cliente SVN a dicha herramienta. Probando, las siguientes opciones han sido las que más me han gustado: AnkhSVN (mi favorita, y es free): Este cliente se integra totalmente con VS2005 y VS2008, mostrando el estado de cada unos de los ficheros en el propio explorador de la solucion.Tortoise con algunos “apaños” (también free): Como muchos sabemos, el cliente de Tortoise se integra con el explorador del propio Windows. Pero también podemos llamarlo desde otras herramientas y hacer algo similar a lo que nos ofrece ankhsvn. Si estais interesado en ello, darle un ojo a alguno de los siguientes artículos, donde explica como crear tus propias vssettings para añadir los iconos y menús de Tortoise al Visual Studio:http://garrys-brain.blogspot.com/2006/11/visual-studio-2005-and-tortoisesvn.htmlhttp://blog.vorpal.cc/category/development/tortoisesvn-in-visual-studio.html#toc-menuVisualsvn (no free ): Una mezcla de las dos herramientas anteriores, integrando visualmente de forma automática el cliente de Tortoise en el Visual Studio. Publicado 09 marzo 08 08:06 por rtebar Archivado en: Visual Studio 2008,SVN,Tortoise,AnkhSVN [...]

  20. [...] En muchas ocasiones, por cuestiones de tiempo, dinero, recursos …, no tenemos la oportunidad de montar un TFS. Aún más, si simplemente queremos un control de código para organizarnos un poquito, tal vez nos esté sobrando con algo más sencillo. Concretamente, en mi caso, quería trabajar con unos compañeros en un proyecto subido en Code Google, el cual da un servicio de repositorio gratuito para proyectos open source. ¿Y cómo conectamos Visual Studio con dicho respositorio para ahorrarnos trabajo?. La solución es integrar un cliente SVN a dicha herramienta. Probando, las siguientes opciones han sido las que más me han gustado: AnkhSVN (mi favorita, y es free): Este cliente se integra totalmente con VS2005 y VS2008, mostrando el estado de cada unos de los ficheros en el propio explorador de la solucion.Tortoise con algunos “apaños” (también free): Como muchos sabemos, el cliente de Tortoise se integra con el explorador del propio Windows. Pero también podemos llamarlo desde otras herramientas y hacer algo similar a lo que nos ofrece ankhsvn. Si estais interesado en ello, darle un ojo a alguno de los siguientes artículos, donde explica como crear tus propias vssettings para añadir los iconos y menús de Tortoise al Visual Studio:http://garrys-brain.blogspot.com/2006/11/visual-studio-2005-and-tortoisesvn.htmlhttp://blog.vorpal.cc/category/development/tortoisesvn-in-visual-studio.html#toc-menuVisualsvn (no free ): Una mezcla de las dos herramientas anteriores, integrando visualmente de forma automática el cliente de Tortoise en el Visual Studio. Published 09 March 08 01:06 by Escuchoyo Filed under: Visual Studio 2008, SVN, Tortoise, AnkhSVN [...]

  21. [...] Hay más información en este sitio sobre cómo poner el SVN en la barra de herramientas. O en este otro para los seres que instalan un server SVN sobre windows (creyendo que estarán seguros). « Más de la detección 3D con una cámara [...]

  22. Great website and a very nice work you have done here.
    You can visit my website at http://nitin.sharma.nt.googlepages.com
    Here you can learn about Visual Studio in detail
    and also learn to make ASP.NET websites and windows applications using
    Visual Studio.

    Learn Visual Studio

  23. I can’t open a solution in visual studio from tortoise (repository)
    please help me!!!!!!!

  24. Did anyone attend PDC last week?

  25. Nice article.

  26. abhishek manocha Says:

    For checking the Remote modifictions too without needing to click on Check Repository what we need to do?
    I tried many versions usine \remote
    using \remote:”Repository path”
    I tried passing userIs aqnd paasord too through -u and -p, nothing worked.
    Is it even possible to do? and How?

    Title Tortoise Check for &Modifications
    Command C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe
    Arguments /command:repostatus /path:”$(SolutionDir)” /notempfile

  27. thanx jon

  28. ed hardy uk
    ed hardy outlet
    ed hardy online

  29. [url= http://www.edhardyuk.net ed hardy uk[/url]
    [url= http://www.edhardyuk.net ed hardy outlet[/url]
    [url= http://www.edhardyuk.net ed hardy online[/url]

Leave a Reply