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

老子叫甜甜 提交于 2019-12-02 23:41:58

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

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

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

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)

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