How to set up SourceGear DiffMerge as the diff/merge tool for Visual Studio?

限于喜欢 提交于 2019-12-20 10:58:14

问题


I am using TFS for source control, but I want to use SourceGear DiffMerge for viewing file differences and doing merges. I found the Tools -> Options -> Source Control -> Visual Studio Team Foundation Server -> Configure User Tools dialog, but setting up the merge parameters is very confusing. What should those parameters be?


回答1:


These are the SourceGear settings that I use:

C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe

Compare:

/t1=%6 /t2=%7 %1 %2

Merge:

/m /r=%4 /t1=%7 /t2=%8 /t3=%6 /c=%9 %2 %3 %1



回答2:


These are my settings. Can't remember where I got them from but I have used them in VS2010, VS2012, VS2013.

C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe

Compare

/title1=%6 /title2=%7 %1 %2

Merge

/title1=%6 /title2=%8 /title3=%7 /result=%4 %1 %3 %2




回答3:


Firstly, you need to change the default command line to:

C:\Program Files (x86)\SourceGear\Vault Client\sgdm.exe

I found the parameters in this thread on the SourceGear support forums, but the arguments given there are incorrect and result in the auto-merge being executed in reverse, i.e. old code overwrites new code. The correct arguments are:

/m /t1=%6 /t2=%7 /t3=%8 /c=%9 %1 %3 %2 /r=%4




回答4:


For some reason my old settings for DiffMerge with %1 %2 stopped working, error "File not found (%1). File not found (%2)."

Changed it to:

"C:\Program Files\SourceGear\Common\DiffMerge\sgdm.exe" $(Base) $(Mine)



来源:https://stackoverflow.com/questions/17523971/how-to-set-up-sourcegear-diffmerge-as-the-diff-merge-tool-for-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!