1
votes

This is most likely a well known fact that when you are merging/releasing changeset from one branch, you are not releasing changes made in that changeset but are releasing all the changes in all the files in that changeset upto that point.

meaning, if a file1.cs was modified by changeset 10 and 11 and i decide to merge changeset 11 to other branch, it actually is going to include changes in my file1.cs file done by changeset 10 too.

Having said that, how do i have TFS makes ure that does not happen or warn me when it does happen?

2

2 Answers

1
votes

This is make sense, assume merging changeset works like the way you are talking about, when you merge two branches, to make sure all changes merged, you need either keep merge each generated changeset or merge multiple changesets at once, you have to also make sure you are not missing any changeset. For now you just have to merge the latest single changeset.

To achieve what you need, the only workaround is manually doing the merge. You could first compare the difference of the changeset 10 and changeset 11, then manually merge the difference. This should do the trick.

0
votes

In your example :

file1.cs added FunctionA Changeset 10

file1.cs added FunctionB Changeset 11

When merge with Changeset 11 from one branch to other branch , usually TFS show that there is conflict and give the option take --> Target or source version. And also option to use the Merge Changes Tool. I usually use Merge Changes Tool to decide what is needed. Yes , it is manual.