problems with shared checkout - merge tool is not available

I am having a significant problem with TFS version control that is making it very unusable in our development environment. We are allowing multiple checkouts. When two developers work on a file and check it in, the Merge option is unavailable and the auto-merge functionality is failing. This makes the product practically useless for projects that have more than one developer.

Here is the scenario:

TFS set to allow for multiple checkouts. 2 developers working on the same project. The starting point is that everyone has the latest version of a source files.

  1. Developer A edits a file and adds a simple comment line (keeping the problem simple here). Visual Studio marks the file as checked out.
  2. Developer B edits the same file and adds another comment line in a different part of the file. Again, Visual Studio marks the file as checked out.
  3. Developer B checks the file in. No problem here.
  4. Developer A attempts a check in. Visual Studio recognizes a conflict and shows the "Resolve Conflicts" screen that has the "Auto Merge All" and "Resolve" buttons as actions
  5. If you click "Auto Merge All", Visual Studio pops a dialog with the following message "Conflict Resolution Summary. filename.cs could not be resolved due to conflicting content changes. This conflict will need to be resolved individually."
  6. The next screen is the "Resolve version conflict" screen. The only two enabled options in the "Resolution Options" list are "Undo my local changes" and "Discard server changes". The "Merge changes for me" and "merge changes in merge tool" options are disabled (this is the main problem). The only other option on the screen is to hit the "compare" button to see the differences in a WinDiff-like screen, but it does not allow for merging.

At this point, the developer is only left with the choice of which file to throw out - in other words, we have to discard one developer's changes which is completely unacceptable. I believe this scenario also occurs even if we do not have concurrent changes, but that a developer works on a file before getting the latest version. Either way, this is a major problem for our development environment. I am hoping there is a magic option somewhere which will resolve this problem.

[3224 byte] By [ShanMcArthur] at [2008-2-10]
# 1
Thanks for the detailed report. Short answer: "merge changes in merge tool" should be available.

Can you paste in the summary? (The text that looks like a local, b server, c both, d conflicting.)

What type of files are they?

Are you running the RTM version of TFS?

RichardBergMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 2

The root of the problem is that the "merge changes in merge tool" option is greyed out.

I don't know what you mean by pasting in the summary. As far as changes go, I outlined in the repro - all you have to do is have each developer add a single comment line in different parts of the code. It is not a code/change complexity issue - no classes have been changed - each developer adds a single line.

They are .cs files.

Yes, this is RTM version.

ShanMcArthur at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 3
Something's amiss in your environment - we do the kinds of change that you described every day and can merge with no problems.
CarlDaniel at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 4

So what settings would make the merge tool not work here. It works fine when I want to merge my branch back with the main trunk. Remember that part of the scenario here is that the developer just edits the code inline, where Visual Studio does an automatic check-out. It does not do a get-latest before checkout. The developer has an outdated copy on his workstation before checking back in.

What settings would make the merge tool option not available for a check-in? This is not a merge.

ShanMcArthur at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 5
Shan,
It is a merge, because you are trying to merge an older version with the new one. Like Carl, this works fine in my environment (and has during all of our Beta testing).

Would you be able to dump the contents of a command line history to a file and post that back here? It might show us something that is causing the problem (like a change of encodings or something). Also, if you could post the server version of a file and the local version.

To dump history from the command line, open up a Visual Studio 2005 Command prompt any type something like:-

tf history /format:detailed /server:http://youserver:8080 $/YourTeamProject/PathToFile/File.cs /noprompt > history.txt

You can then open history.txt in notepad and copy the contents into a post here.

Can you also check your Source Control file types (Team, Team Foundation Server Settings, Source Control File Types...) C# files should be listed (with the extension .cs) and the file merge should be enabled.

Finally, if for some reason the merge option is not available (in the cases that change is correctly unmergable then cancel out of the check-in and manually do a Get Latest on the file. this will force the merge dialog again - you can then ignore the server changes and then do a compare against the server version to manually merge the two files. Less than ideal I know, but will at least allow you to work until we can figure out what is up with your environment.

Regards,

Martin.

MartinWoodward at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 6
By "summary" I meant the text under Conflict Details that says "Changes: xx local, xx server, xx both, xx conflicting." What are those 4 numbers?
RichardBergMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...

Visual Studio Team System

Site Classified