tags:

views:

378

answers:

2

I am merging my development branch into the main branch. There is only a subset of files that I have changed in my development branch, all other files should remain unchanged. Logically, I only want to merge files which I've changed. I would not check in a file which I did not change.

But when I do the merge operation in TFS, it marks every single file in the tree with change type 'merge'. It looks like I must checkin every single file in the whole source code tree! I really do not want to do this becasue then it becomes impossible to look at the changeset and see what files I acctually changed as part of my project.

At first, I thought I could use the tfpt.exe Undo Unchanged command to undo all the 'merge' changes, but this won't undo those changes.

Anyone have any ideas on this? thanks.

A: 

In Visual Studio 2008 and TFS 2008, this does not occur. Only files that have changed will be marked as merge. If you do a compare of a file between the branch and the trunk are there any changes? Changes such as encoding will still make TFS merge this file back.

Ray Booysen
Great! I have TFS 2008 but VS 2005, so I guess this is a function of the client.
TheSean
No, pending changes are computed entirely on the server. See the VersionControlServer.QueryPendingSets() API for details.
Richard Berg
Exactly. Either way, encoding changes or any code changes will mark this as requiring a merge.
Ray Booysen
+1  A: 

There are a number of possible reasons. This is not a complete list:

  • You performed a namespace operation (delete, undelete, rename) on a parent folder of the files marked "merge"
  • You performed a namespace operation (delete, undelete, rename) that had already been performed in the target branch
  • You performed a sequence of namespace operations that collapsed into a no-op (eg delete + undelete, or rename a -> b -> a)
  • There are unresolved conflicts
  • You performing a discard

Note: all of these apply equally to 2005 & 2008.

Richard Berg