开发者

TFS merge changeset into file with pending change

开发者 https://www.devze.com 2023-03-18 18:22 出处:网络
I have a feeling this is a very stupid question, but I can\'t find the answer anywhere. So 开发者_StackOverflow社区we have a Dev branch and a QA branch. I merge a bunch of contiguous changesets from

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

So 开发者_StackOverflow社区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.


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.


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


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.


It is enough to check-in the folder that you are going to branch to.

In my case I created a new folder in my target branch and it was on the "Add" state (without check-in) and I had this same problem. After I checked in this folder it worked well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号