Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS merge changeset into file with pending change

Tags:

merge

tfs

I have a feeling this is a very stupid question, but I can't find the answer anywhere.

So we have a Dev branch and a QA branch. I merge a bunch of contiguous changesets from Dev into QA, and resolve conflicts. Now I want to merge in a later changeset, over the changes I just merged (not having checked in the changes from the first merge). No dice, says TFS:

The item $/My/Path/to/the/file.vb has an incompatible pending change.

What's its problem? Why won't it give me a merge conflict option to merge the new changeset to the files with the pending changes? I don't want to check in the first merge just so I can merge in another changeset.

like image 414
Turner Hayes Avatar asked Jul 08 '11 11:07

Turner Hayes


People also ask

How to merge a changeset in TFS?

In Source Control Explorer in Visual Studio, right-click your branch, and choose the new menu-option 'Merge Changeset By Comment'. After that, enter the TFS item under phrase.

How to merge shelve changes in TFS?

Get the shelved code and copy it to another folder on your hard drive. Then GLV the latest server code. Check out the files you have changed (or easier, the root folder), and then manually merge the two sets of sources.


3 Answers

TFS doesn't allow you to merge multiple non-contiguous changesets if the same file is changed in both of them. Your best option is to checkin the first set of changes, then do the merge.

like image 72
Joel Rondeau Avatar answered Oct 16 '22 06:10

Joel Rondeau


I had the same problem. I did undo all the pending local changes and un-shelved the pending changes. It fixed my problems.

like image 23
Rajan Kumar Kharel Avatar answered Oct 16 '22 04:10

Rajan Kumar Kharel


I was experiencing this same issue for a different reason and since I stumbled here for help I will give my solution.

I had a branch (branched_from_main) that was branched from main. I made changes to branched_from_main and checked them into the tfs repo. Then when I tried to merge branched_from_main back to main I was experiencing this issue. After looking into it for a while I realized that I had opened the main solution and built it. This meant that the solution now pulled down all of the nuget packages. Thus my main branch was considering the packages as pending changes.

So to fix the issue I had to reopen the main solution and undo those pending changes. Then I was able to merge branched_from_main back to main.

like image 28
richbria90 Avatar answered Oct 16 '22 06:10

richbria90