Jul 2, 2010

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!

17 comments:

  1. 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 :)

    ReplyDelete
  2. 4. Tools -> Options
    Select Environment -> Keyboard

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

    ReplyDelete
  3. Excellent! Thanks much for this.

    ReplyDelete
  4. Thanks so much!

    Bruno

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

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

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

    ReplyDelete
  8. My life has now improved considerably. Thanks Richard.

    Also thanks Eddie Groves :)

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

    ReplyDelete
  10. Thanks this is exactly what I was looking for.

    Nimesh Dhruve

    ReplyDelete
  11. OMG! Finally double click opens differences! I'm so happy :)

    ReplyDelete