views:

124

answers:

1

Imagine the following situation: I have two branches: DEV and MAIN. I'm working on a file in the DEV branch called program.cs. I checked it in multiple times, so I end up having a couple of changesets: for example 5900, 5905, 5909. Please note these are not contiguous.

Now I want to merge these changes to MAIN, but without checking in each changeset in between. This isn't possible because: the first merge works, but the second merge of the changeset gives me the following error:

TF14085: Cannot merge $/DEV/program.cs to $/MAIN/program.cs because there is an incompatible pending change (not edit or encoding) at $/MAIN/program.cs already.

Is there any way to get around this error? Is Visual Studio 2010 behaving the same (I will probably have the chance to try this out later today)? How does TFS do this when merging multiple, but contiguous changesets?

+1  A: 

You need to check in the current changes then redo the merge. I have had the same issue and unfortunately the only way around is to check-in between merges.

Oded