TortoiseSVN in Visual Studio
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
Introduction
I have created a toolbar with Update, Log, Check, Revert, and Commit . 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.
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.
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:.
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.
Done
Your toolbar should look something like this:
- 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.↩
'.NET > VisualStudio' 카테고리의 다른 글
Visual Studio AddIn 소개 - Solution Explore의 파일 찾기 (PhatStudio) add-in (0) | 2010.08.29 |
---|---|
Visual Studio 항목에 대해 게시속성을 적용할 수 없습니다 (0) | 2010.03.23 |
VS2008 XAML 코드 작성시 자동 정렬기능 사용시, 공백 정렬 설정팁 (0) | 2009.12.18 |
Java 응용 프로그램을 Visual C#으로 변환 (2) | 2009.11.16 |
VisualStudio 2005에서 자바스크립트 디버깅하기 (0) | 2009.05.10 |
TFS 동영상 PDC2008 (0) | 2009.04.10 |
vs2005 화면색 글 세팅파일 모나코 글꼴 MONACO 환경설정 (0) | 2009.01.05 |
프레임워크가 깔려있는 곳 프레임워크 위치 (0) | 2008.12.17 |