boggy
boggy

Reputation: 4027

TFS 2012 doesn't detect changed files properly when merging branches and it shows false positives

I keep coming across an issue in TFS 2012 where, when I try to merge a branch into another (VS 2015), TFS shows me files as changed even though they are identical with each other.

Somewhere else on SO, I found a workaround, where I right-click, choose Undo, click Undo Changes, then select the option None in the dialog that pops up. TFS goes away and it does whatever it should have done in the first place and it keeps only the files that have been changed. The problem is that this trick doesn't always work, the dialog where I select None doesn't always show up, especially when the only changes are new files in the source branch. So, I have to do it manually and merge specific folders, up to a point where I became annoyed because I have to spend more time on stuff that should work out-of-the-box.

My question is, did they fix this in TFS 2015?

Thanks

Upvotes: 1

Views: 89

Answers (1)

Matt
Matt

Reputation: 1240

When a merge occurs in TFS between files that don't have an existing merge relationship, they will appear as if they are being changed in the Pending Changes section of Team Explorer even though there are no differences.

The pending change is establishing the merge relationship. The following images are an example of TFS 2015 merging files between folders that don't share a relationship, but are mostly similar. The files that haven't changed are marked with [merge], and the files that have are marked with [merge, edit].

Baseless merging warning Merge vs Merge Edit

Keep in mind that this may occur when two folders DO have a merge relationship, but some of their children might not.

This may also occur when you make an identical change between two files in two different branches that already have a merge relationship. Even though both files changed identically at the same time, and still match each other, a [merge] change will still appear in Pending changes in TFS 2015. If this is the issue you're having with TFS 2012, then you're still going to deal with it in TFS 2015.

Upvotes: 1

Related Questions