정리

TortoiseSVN(Diff, Log, Blame)과 Visual Studio 통합 방법

저장소/VC++

요기서 퍼왔어요~

http://tortoisesvn.net/visualstudio.html


AnkhSVN이나 VisualSVN을 설치해서 써도 좋지만,

TortoiseSVN의 Diff, Log, Blame 기능만 사용해도 충분하다면 다음과 같이 설정한다.



If you're using Visual Studio, you can integrate TortoiseSVN commands to various context menus. Of course, there are Subversion plugins for Visual Studio like AnkhSVN or VisualSVN, with the latter already using TortoiseSVN for many of its UI. Those plugins also have the advantage that when you do refactoring, they automatically record the renames and moves in SVN.

But if you're using one of the free versions of Visual Studio, you can not use those plugins. And sometimes it's still nice to have some of the TortoiseSVN commands available from Visual Studio directly, even if you have such a plugin installed.

The first step is to add the TortoiseSVN commands as external tools, under the menu TOOLS->External Tools....


  한국어 버전 ->  

Add the name of the command, the path to TortoiseProc.exe and then the parameters for the command.

Use the VS variables wherever needed. Since I add my commands to the context menu of the open file tab, here's the parameters I used:

  • /command:blame /path:"$(ItemPath)" /line:$(CurLine)
  • /command:diff /path:"$(ItemPath)"
  • /command:log /path:"$(ItemPath)"

Notice the /line: parameter: this will make TortoiseBlame automatically scroll to the same line the cursor is located in the opened file in Visual Studio.

Now to add those new commands to the file tab context menu, go to TOOLS->Customize..., select the Commands tab, click the radio button Context menu and then select Other Context Menus | Easy MDI Document Window.


 

 한국어 버전 ->  

Then click the Add command... button:


  한국어 버전 ->  

Now you have to select the commands. Problem is that the custom commands are not shown with their title but only as External Command X with X being the number of the external command.

In my case, the commands were number 9-11, you might have to do some trial-and-error here. Just add the commands you think are the ones you added and then check if the right ones show up in the context menu.

음... 외부  도구에서 추가한 기능의 이름이 안 보이고 그냥 '외부 명령 XX' 요렇게 보이는 것에 주의 필요합니다.

대충 제일 아래쪽부터 순서대로 찍으면 될듯... ^^;

And this is how the context menu of the open file tab looks like:


  한국어 버전 ->