Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure TFS to work with various merge tools

People also ask

How do I merge two branches in TFS?

Right-click the main branch, point to Branching and Merging, and then click Merge… The Source Control Merge Wizard appears. On the Select the source and target branches for the merge operation screen: In Source branch, specify the main branch. In Target branch, specify the development branch.


When I was looking for how to do this, I found this post to be invaluable: http://blogs.msdn.com/jmanning/articles/535573.aspx


The long procedure is provided in a Rory Primrose blog posting

The short answer is the argument list for compare is:

/x /e /ub /wl /dl %6 /dr %7 %1 %2

and the argument list for merge is:

/x /e /ub /wl /dl %6 /dr %7 %1 %2 %4

Sometimes Winmerge does not return 0 and TFS will think the merge was canceled. You need to use the following wrapper batch file for merging:

@rem winmergeFromTFS.bat
@rem 2007-08-01
@rem File created by Paul Oliver to get Winmerge to play nicely with TFS
@rem
@rem To use, tell TFS to use this command as the merge command
@rem And then set this as your arguments:
@rem  %6 %7 %1 %2 %4
"C:\Program Files\WinMerge\WinMerge.exe" /x /e /ub /wl /dl %1 /dr %2 %3 %4 %5
exit 0

And then you set the argument list to:

%6 %7 %1 %2 %

exit 0