When you work with Team Foundation Server 2010 and Visual Studio 2008 you cannot merge file changes when you try to unshelve a shelveset. In fact if you try to unshelve a shelveset which contains file already chenged on the local workspace, you will have the following error:
TF203015: The item $/mypath/myfile.cs has an incompatible pending change
because the file myfile.cs is checked out on the local workspace and the unshelve operation fails because the merge operation doesn’t occur during unshelve operation.
To support this requirement Microsoft has released the Team Foundation Power Tools 2010 (TFPT) that allow you to perform the merge during unshelve.
Below is the step by step procedure.
Assume that the working folder is C:\WORK\MyProject, which is the local folder mapped to the TFS project MyProject.
- Open the Visual Studio 2008 Command Prompt
- Go to workdir with the command cd C:\WORK\MyProject
- Insert the command tfpt unshelve and press Enter(if the credentials prompt appears, insert the right credentials)
- Then the popup “Find Shelveset” will appearChoose the desired shelveset and click Unshelve button
- “Unshelve/Merge Shelveset” window will appar and will show to you the list of confilct files.
- Click the Auto-merge All button.