This is not a duplicate of an existing and answered question, like this one.
It is well known that VS pending files list shows all checked-out files, some of them might have no edits at all. And the recommended solution to remove those files without an edit is to run a TFS Power Tools command, as answered here.
However, this doesn't apply to the files that were changed (by a mistake, or on a purpose), but the change was manually reverted. In other words, if the content of two files is binary (or literally) the same, the "Undo Unchanged" command might still think the file has changed and does not remove it from the list.
Is there any way to force TFS PT to perform content-based comparison for pending files vs. latest server version?
Use local workspaces instead of server workspaces (on VS/TFS 2012 or later). With local workspaces, the only things that show up in the "Pending Changes" window are actual modified files.
I have local changes on my machine.
My coworker has shelved changes with files that overlap my changes.
I'd like to pull my coworker's shelveset and resolve the conflicts.
However, when I try to unshelve, I get an error message :
"The item ... has an incompatible pending change."
How can I merge in my coworker's changes?
I ran into this the other day and a co-worker gave me this great simple tip.
There is an easy way to do this using Visual Studio Power Tools. You can perform the unshelve and merge together by using the tfpt unshelve command from a Visual Studio command prompt. Make sure your active directory is a directory that is mapped to your local workspace otherwise you may see "Unable to identify workspace". When you run the command you'll be presented with a dialog to choose your shelveset. After that, you will receive an additional dialog that allows you to merge conflicting files.
You will first need to undo any of the changes that you have done in the files that are also in the shelved changeset. You can then unshelve and put your changes back.
Another way is to check in your changes and then unshelve. Or the other way around, first check in the shelved changes and then get the latest version where you will have to manually handle any conflicts.
Is it possible to select which changes in a file you want to check in? For example, I have added two projects to a solution file, but I only want to check in one of them.
Or I have done work in two parts of a file, but only one part is done and ready to check in.
Ideally, I'd like to use the new diff-utility in 2012, and just select the parts I want to check in, but can I do that?
My workaround (in VS2015) is:
Shelve affected Files
Delete Stuff you don't want to check in (maybe via compare with latest version)
Check in
Unshelve shelveset
(In my case than VS-Merge-Tool opens to Restore changes you want (Previous checked in lines was not to merge))
Unfortunately there is no way to do that in TFS natively. TFS will always check in the whole version of the current file and it will force you to save your changes before checking in.
This is possible with Git. Using Git, if you were to do the following:
Add "line 1" to foo.cs
Stage foo.cs via "git add foo.cs"
Add "line 2" to foo.cs
Commit foo.cs
Then only line 1 will be checked into the repository. Furthermore, you can integrate your local git repository using git-tf, a new open-source tool published by Microsoft. You can download that tool here or here. The downside of working with Git right now is that it doesn't have great VS integration.
I'm using Visual Studio 2010 Pro against Team Server 2010 and I had my project opened (apparently) as a solution from the repo, but I should've opened it as "web site". I found this out during compile, so I went to shelve my new changes and deleted the project from my local disk, then opened the project again from source (this time as web site) and now I can't unshelve my files.
Is there any way to work around this? Did I blow something up? Do I need to do maintenance at the server?
I found this question on SO #2332685 but I don't know what cache files he's talking about (I'm on XP :\ )
EDIT: Found this link after posting the question, sorry for the delay in researching, still didn't fix my problem
Of course I can't find an error code for TF203015 anywhere, so no resolution either (hence my inclusion of the number in the title, yeah?)
EDIT:
I should probably mention that these files were never checked in in the first place. Does that matter? Can you shelve an unchecked item? Is that what I did wrong?
EDIT:
WHAP - FOUND IT!!! Use "Undo" on the items that don't exist because they show up in pending changes as checkins.
I had deleted the files in trying to reload the workspace, even though I had shelved the changes. Then VS2010 thought those files were still pending to save. I didn't need that, so I had to figure out to "undo" the changes in Pending Changes.
Then I could unshelve.
It thought I had two ops (unshelve, commit-for-add) going simultaneously, and I thought I had only one op (unshelve).
This is a slight aside to the OP's question
You can get a TF203015 when you try and batch merge a multiple changesets from one branch to the other without due care.
Consider a situation where you have a MAIN trunk and a DEV branch. You branched DEV from MAIN and have diligently worked away at a feature in DEV; checking work back into DEV as you progressed. Now fast forward a week or two. You are now feature complete and want to merge back into MAIN.
This is where one of our devs hit this error.
He had been working on one solution for weeks, and checking changesets back into DEV periodically, so wanted to merge a non contiguous series of changesets back into MAIN.
So he picks the merge option, selects the first changeset; merges without issue, then immediately went to merge the next changeset; and bang TF203015, and its very unhelpful test in the output window; incompatible pending changes.
After a little fiddling around we now realize what is going on here; the first merge created a pending change in MAIN for the developers solution. The next merge attempt was also changes to the same solution, which would require TFS to "queue up" a second set of pending changes to the same files. It cant do this.
So in this scenario TF203015 means; "The destination branch already has pending changes on some files that are changed in this changeset. Please resolve and commit the destination branch changes before performing this merge operation"
The solution; after each merge operation our developer tests the workspace for MAIN and commits the pending change caused by the merge, then goes back to DEV and repeats.
Actually sensible and simple, but masked by a very obtuse error message.
You can use the Team Foundation Server Power Tools March 2011 (http://msdn.microsoft.com/en-us/vstudio/bb980963.aspx) that includes the command tfpt unshelve.
Once the Power Tools are installed, open a Visual Studio command prompt, change to the directory that contains the project of interest, and execute the tfpt unshelve command. It will unshelve and display the merge dialog so you can resolve the conflicts.
I credit this blog post with helping me find this solution: http://fluentbytes.com/the-how-and-why-behind-tf203015-file-has-an-incompatible-change-while-unshelving-a-shelve-set
I had what appeared to be the same issue but I had created a branch after shelving my changes and I wanted to unshelve those changes to the new branch.
TFS cannot unshelve to a different path than the path upon which the shelf was created.
Solution: I unshelved back to the original branch then I used beyond compare to merge the changes from my original branch to the new branch and checked in.
It could also be that after you create a folder in say a "Test" and you want to merge from dev to test, that you do not have that newly created folder structure checked into TFS - You will /can also get this error message.
Thus this message error CAN occur without anything to do with SHELVESETS as well for others coming from google and finding this page.
This might be the same as jcolebrand's answer, but I'm afraid I found the phrasing there a bit abstruse. Sincere apologies if I'm just repeating.
In my scenario the incompatible pending change message was presented because I was trying to roll back multiple changesets, and the same file was affected by more than one of those changeset.
In my case I did not want to commit until all the changes had been rolled back. I believe if I had been able to commit after rolling back each changeset, the error would not have happened.
The method which worked for me was as follows:
I opted to roll back one changeset at a time. I found using the command line was actually a more informative way of doing this because it lists all the conflicts, whereas I think the VS UI rollback just lists the first.
While rolling back a changeset, if there was an incompatible pending change, I had to undo my workspace's pending changes for the affected files.
When all the changesets had been rolled back, I had to manually revert the files which had experienced incompatible pending change. Mostly this could be achieved simply by getting a specific version of the file (the "last-known-good" version before all the bad checkins started). But for some files where there had been both desired changes and undesired changes, I got the "last-known-good" and manually applied the good changes to it.
This link resolved my issue:
https://blogs.infosupport.com/the-how-and-why-behind-tf203015-lt-file-gt-has-an-incompatible-change-while-unshelving-a-shelve-set/
The reason was pending change in the same work space create an incompatible change. So undo the pending changes and try unshelve. This should resolve the issue.
If you have two branches MAIN(target) and DEV(source), now you want merge DEV into MAIN, then all files you want merge from your source, must not be older then the similar files in your target branch.
For example: you have an changed file test.cs in your DEV branch, changed at 14.03.2016. In your MAIN branch you have test.cs changed at 15.03.2016. So the target is newer then the source file and you have TF203015.
Solution: navigate in TFS Explorer to the conflict-file and merge it explicit. TFS will open the conflict manager and you can merge the conflicts by hand. Following you can merge the selected changeset.
Remarks: If you have more conflicts, you must navigate to each conflict-file and merge it explicit, so TFS opens the the conflict Manager and you can merge it by hand.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Get all files from VSS for a given date?
I need to get a complete project recursively as it existed on a specified date in the past. How can I do that without having to look at and selectively recover each individual file? Source Safe 8.0
Actually, it might be possible. Here are instructions I received from a co-worker (thanks Bruce!) for doing just that with SourceSafe 6:
In the VSS database, select the top-most project (not an individual file in the project) that you are interested in.
Get the history for that project, making sure that the "Recursive" and "Include file histories" check boxes are selected. The "Include Labels" check-box is optional, but you definitely don't want "Labels only."
Select the file / date you're interested in from the history list box.
Click the "Get" button.
Click the "Yes" button on the pop-up dialog that asks, "Get the entire project containing this file version?"
Hope this helps (for next time).
If that particular version was not branched out or labelled, I believe you have no choice but to manually check and recover each file from Visual Sourcesafe.
More information on labelling and branching and sharing for Visual Sourcesafe over at MSDN.
If you have a choice of using another SCM, I would recommend using Visual SVN to integrate an SVN Server with Visual Studio.