Today one of our developers wanted to unshelve a shelve set he created earlier that morning and got the error message TF203015.
I must say I also was quite confused about what an “incompatible change” would be and why it could not unshelve the files for me. What can be incompatible? Is the file corrupted, other encoding,…?!? At first I thought this might have been caused by the fact that this developer was running Visual studio 2008 + TFS 2010 compatibility GDR against our upgraded 2010 TFS server. Since many internal changes where made in the 2010 release I feared something had gone wrong with the shelve set on the server.
So I I tried to unshelve the shelve set he created. And that just went fine. So why did he get the message and I didn’t ?
So what do you do, you search the internet for this error, but at this point there is not that much to find about this issue. So I luckily could ask the question at the always helpful TFS champs. And they immediately asked me if my developer already had a pending change on the sources he wanted to unshelve in his workspace. And yes that was exactly the case. So why would a pending change in the same workspace create an incompatible change you might ask yourself? Normally you would just resolve this with a merge conflict dialog you might think.
That is correct. It appears that merging of conflicting changes that come from shelve sets is still a thing to build by the TFS team and is still on the product backlog. So when you have conflicting changes in the shelve set, you just can’t unshelve anymore. And this has been around since 2005, so nothing new in this release.
So to give you an idea about the scenario, this is how to reproduce the issue:
- Edit a file a.cs
- Create a shelve set and name it “test” that contains the change
- Now create a new workspace (you can omit this step and progress in the same workspace, but it seemed less obvious to me this also is an issue with another workspace)
- Edit the file a.cs again and change something that normally would be easy to merge (add a line of comment to another function or something similar)
- At this point try to unshelve shelve set “test”
- You will now get the following error: TF203015: The item $/<teamproject>/main/solution/project/a.cs has an incompatible pending change
So whenever you run into this issue, take a look at the output window of Visual studio and switch it to the “Source Control – Team Foundation Server”. there you will find the details about the file that has an incompatible change. And incompatible, just means it has a merge conflict with the current workspace and VSTS has no support yet for you to show you the merge resolution screen for this issue. so what to do when you run into this issue and you want to keep the changes in your local workspace?
Well just create an empty workspace and unshelve there, no conflicting changes, so it will unshelve fine there. then merge by hand using your favorite merge tool.
As an alternative you can also use the power tools that includes the command tfpt unshelve.(http://msdn.microsoft.com/en-us/vstudio/bb980963.aspx) Then you can get the conflict resolution screen to apear and you are able to merge the file as you would have expected.
this looks as follows:
(assuming a working folder = d:\temp\test\TipCalculator\TipCalculator)
Open a visual Studio command prompt
Enter the following command: tfpt unshelve
For my server this shows the following dialog:
Now I select the shelveset test 1 again and get the following dialog:
So now I can select my file and then get the conflict resolution dialog:
this now gives me the option to do the merge and voila, it unsheleved 🙂
So when you run into this issue again, you know the power tools are your friend.
Hope this helps,
CTO at Xpirit, Microsoft Regional Director, Visual studio ALM MVP, Speaker, Pluralsight Author and IT Architect Consultant