Ray K.
Ray K.

Reputation: 2511

Setting TFS pending changes default view to folder view

Got a question about viewing files in TFS (specifically, under Pending Changes).

I do NOT like the default flat file view that comes up when I open Pending Changes. I want to set the default to folder view. But I can't find any such setting anywhere.

Is there a way to do this?

Upvotes: 1

Views: 941

Answers (2)

Eellor
Eellor

Reputation: 71

Though MS officially replied that VS is lack of this feature, there's a workaround using macro. I found it yesterday and also added it in this posting:

https://connect.microsoft.com/VisualStudio/feedback/details/520449/window-pending-changes-does-not-remember-flat-or-hierarchical-view

FYI, this is the workaround that I added there:


(I am using VS 2008 but this trick may work for VS 2010. The details below are for VS 2008.)

A startup macro can be used to workaround this issue. Follow these steps:

  1. Open VS, make sure that Pending Changes pane is showing in Flat View and close it.
  2. Run Tools > Macros > Record TemporaryMacro.
  3. Select View > Other Windows > Pending Changes. Then hit Folder View button in Pending Changes.
  4. Finish macro recording and open Macros IDE (Tools > Macros > Macros IDE...).
  5. There should be TemporaryMacro() recorded under RecodingModule macro. Copy the contents of the subroutine. In my case, it was:

    DTE.ExecuteCommand ("View.TfsPendingChanges")

    DTE.Commands.Raise("{FFE1131C-8EA1-4D05-9728-34AD4611BDA9}", 4804, Customin, Customout)

  6. In the Macros IDE, go to EnvironmentEvents. In the dropdowns at the top of the editor which look like Types/Members selector of VS code editor, select "DTEEvents" and "OnStartupComplete" respectively.

  7. Event handler DTEEvents_OnStartupComplete() should have been generated. Paste the copied macro contents from step 5 above into the new event handler.
  8. Save changes and that's it.

Steps above may look complicated but it's nothing more than recording pane opening and button clicking action as a macro and registering it in the startup event handler.

Hope this helps.


Upvotes: 1

ChrisLively
ChrisLively

Reputation: 88074

I'm using VS 2010 with all updates applied., you didn't indicate which version of TFS you have.

I opened the pending changes window (View > Other Windows > Pending Changes). Then I clicked on the "change to folder view" button and closed the window.

When I reopened the pending changes window, it kept my settings and showed it using the folder view.

Upvotes: 0

Related Questions