Unhappy campers with TFS built in Diff Tool
Update
the instructions for setting up P4 to work with TFS Merge are a little more difficult and best explained here
Ok, I have to be fair, I quickly discovered the really only big problem with the built in TFS diff tool back in TFS 2005, adjusted my development to account for it, and never thought about it again. I’ve been pretty happy with TFS’s built in Diff tool for the past 5 years. But as was pointed out to me by one of my fellow developers, just because I have adjusted to the handicap of “colour-blindness”, doesn’t mean that there isn’t a difference between red and green for other people. He didn’t put it that way, but until he reminded me of how much I changed my development style to fit the tool, I didn’t realise how hobbled I had become.
First up, it should be pointed out that the DiffTool in TFS has a major problem as originally configured to not ignore white space. That means that in comparing text by default it see
if(true){
value
as different from
if(true){value
One has tab and one has 3 spaces. And with the whole page reformat command, and the way developers like to have minor differences between them, this is a major issue. Now it turns out that you can invoke the diff tool so that it will ignore white space, and other unimportant things (details here http://msdn.microsoft.com/en-us/library/6fd7dc73.aspx), but still there are better tools out there. And it turns out that TFS is quite willing to let you use them if really want to.
So my co-worker really likes perforce’s compare tool, so I thought I would document for him how to “plug it in” in place of the TFS default tool. I used the instruction here http://msdn.microsoft.com/en-us/library/ms181446.aspx to figure this out.
First things first, download the perforce compare tool, navigate here http://www.perforce.com/perforce/downloads/component.html
then select the thru the option to download the merge tool you want.
So I installed just the merge tool
Once installed, open Visual Studio 2010 and select Too;s | Options
Navigate to Source Control | Visual Studio Team Foundation Server | Configure User Tools
Click the add button in the User tools, put in the extensions you want “.vb,.cs,…”, select p4merge in the command prompt and leave the arguments alone for Compare
I added –dw to the start of the arguments list , which is a perforce commandline argument to tell it to make sure it ignores whitespace by default when it starts up
now in tfs, pull up a difference in your project (by comparing folders) right mouse on a folder and…
