Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I manually resolve conflicts and mark them as resolve when using TFS?

Coming from the SVN world this was dead easy: 1) do the merge and get a conflict. SVN gives you the conflicting files in the working copy. 2) resolve them any way you need to (using any external tool if required). 3) "svn resolved" to mark the conflict as resolved. 4) check in (or carry on working, etc).

Now with TFS and Visual Studio (2010), the only options we seem to have are: - -> Merge in the TFS merge tool (text files only). -> For non text files, take the source branch file (overwrite target branch file) or keep the target branch file (ignore the source branch file).

I need to be able to resolve conflicts for some of my file types using external tools (E.g. Erwin) and then mark the conflict as resolved.

I've tried resolving the conflict, putting the new file into the target branch filesystem workspace (i.e. the working copy) and using "tf resolve /auto:DeleteConflict". That didn't help. The local resolved/consolidated file was completely ignored when I finally checked in the merge.

Surely TFS/VS can do this!

Any help would really be appreciated!!

Thanks.

like image 814
Mark Matten Avatar asked Apr 25 '12 07:04

Mark Matten


2 Answers

You can set up specific rules for Compare and Merge in Visual Studio. It is located under Tools->Options->Source Control->Visual Studio Team Foundation Server. Choose Configure User Tools..., and from there you can select any external tool to use for your operations.

You can use file filters to define any number of rules and add here for Operation "Merge" any custom tool:
**enter image description here**

like image 109
Torbjörn Bergstedt Avatar answered Sep 27 '22 17:09

Torbjörn Bergstedt


Once you have the content that you want on disk (after manually using your merge tool) instead of running "tf resolve /auto:DeleteConflict", run "tf resolve /auto:AcceptMerge". This tells TFS to accept the content that is on disk as the resolution of the merge.

like image 35
Taylor Lafrinere Avatar answered Sep 27 '22 16:09

Taylor Lafrinere