How to Double Click to Diff Pending Changes in TFS

Have you ever looked at a file in the pending changes window and wanted to see what the differences were between that file and the latest version?  If so, then you’ll no doubt have done the right click, sub-menu dance like this:

image

Well, you don’t have to.  There’s actually a few ways to avoid the right clickiness – here’s how:

1. Press Shift + Double Click.

2. Highlight the file and press Shift+Enter

3. Don’t press shift at all! Just change the registry as follows:

Path:     HKCU\Software\Microsoft\VisualStudio\<ver>\TeamFoundation\SourceControl\Behavior
Value:   DoubleClickOnChange (DWORD)

0 == view as the primary command (default)
1== compare as primary command

Setting this registry key will make double-click/enter do a diff instead of viewing the file, and make shift+double-click/enter view the file instead.

 

Enjoy!

 

Reader Comments

Thanks - really useful! Having to do this ridiculous dance each time you want a diff is, well, quite ridiculous! Thanks for fixing it for me :)

4. Tools -> Options
Select Environment -> Keyboard

Scroll down to
TeamFoundationContextMenus.SourceControlPendingChangesSourceFiles.Compare.TfsContextPendingCheckinsCompareWithLatestVersion
and set a Shortcut key.

Excellent. Thanks :)

Great tips, thanks!

Excellent! Thanks much for this.

Thanks!!!

Thanks so much!

Bruno

Be sure that when you copy the value from this blog that you omit the space, it won't pick up the value otherwise :)

Great tip! Now to do this for all files at once...

Nice tip!

Nice tip, works great on my Visual Studio 2010 running with TFS 2008.

My life has now improved considerably. Thanks Richard.

Also thanks Eddie Groves :)

Thank you!

You are a true life saver!

Thank you very much, default double click is very annoying.

Thanks this is exactly what I was looking for.

Nimesh Dhruve

Post a Comment



Welcome

Thanks for dropping by. Enjoy your visit!

MVP Logo Visual Studio 2012 Cookbook
Find out more about Richard.

Richard on Twitter  
profile for Richard Banks on Stack Exchange, a network of free, community-driven Q&A sites

User Groups

My Open Source Projects

Podcast

Blog Archive