tags:

views:

946

answers:

2

If a file has been changed by 10 different changesets, with different users for various changesets.

Then the user that checked in changeset 5, decides to merge his changes.

What will then happen to the changes in changeset 1 to 4? Will they automatically be merged?

A: 

Yes, TFS will merge all changes UP TO and INCLUDING changeset 5 automatically.

When you merge a particular changeset back to Main, you are effectively asking TFS to integrate all changes beginning from the previous baseline up to the changeset that you specify.

bhavinb
This is not correct. You can also cherry-pick individual change sets for merging.
jeroenh
+2  A: 

TFS has two ways of merging (you can select either one in the TFS Merge dialog):

  • All changes up to a specific version
  • Selected change sets

In the second case, you can cherry-pick any change you want, without necessarily merging all other change sets.

jeroenh
Correct. HOWEVER: in practical terms you are limited by the algorithm in your configured 3-way merge tool, and by the nature of the changes themselves. If changes 1~5 all touched a given block of code, cherry picking #5 will effectively bring over all changes to that block. Different tools are more/less aggressive about splitting files into blocks. (default tool's pretty conservative; you'll be more likely to see changes from #1-4, tradeoff being fewer dependencies omitted) Of course, you'll have a chance to review the conflicts before resolving. Plus the usual build/test/checkin policy cycle.
Richard Berg