Using Code Compare as a merge tool for TFS 2010
Posted: Wed 14 Mar 2012 14:59
We have received several feedbacks about bad impression of using Code Compare as a merge tool for TFS 2010. This is due to the fact that TFS does not perform automatic conflict resolution before handing it in a diff tool, and Code Compare at the moment can't do automatic merge. In connection with this, users are forced to resolve all the changes, and not only the conflict ones, manually. We have planned to implement automatic merge in the next version.
As a workaround, we wrote a special batch, which calls automatic merge before opening Code Compare. A disadvantage of using it will be the appearance of the console window. If you decide to use this solution, you should perform the following steps:
As a workaround, we wrote a special batch, which calls automatic merge before opening Code Compare. A disadvantage of using it will be the appearance of the console window. If you decide to use this solution, you should perform the following steps:
- Create a file with .bat extension with the following content:
Code: Select all
if not defined ProgramW6432 set ProgramW6432=%programfiles% "%programfiles%\Microsoft Visual Studio 10.0\Common7\IDE\diffmerge.exe" /merge /noprompt %1 %2 %3 %4 "%ProgramW6432%\Devart\Code Compare\CodeMerge.exe" /TF=%1 /MF=%2 /RF=%4 /BF=%3 /TT=%6 /MT=%7 /SC=TFS exit /B 0
- Open the merge tool settings in Visual Studio: Tools -> Options -> Source Control -> Visual Studio Team Foundation Server -> Configure User Tools -> Add .*/Modify
- Specify the path to the batch file
- Specify the following arguments:
Code: Select all
%1 %2 %3 %4 %6 %7 %8 %9