2

I am writing a Add-in for Visual studio 2010+ that will act as a Mercurial<->TFS Bridge.

The Add-in currently works by taking the latest from an existing TFS project and converting it to a local Mercurial repository that pushes through TFS up to the central store. When getting latest it will pull through TFS down to a TFS mapped path that then is commited to a local merge repo for Mercurial, and finally is moved into your working (cloned) repo.

So, with that said, I want to be able to use the TFS feature still, as if it is not using another Source Control Plugin (but in reality it is using the VisualHG plugin).

I would like to browse the "Source Control Explorer" and get latest, check-in, etc. I was trying to do this in the most primitave way, by trying to trigger Visual Studio to switch the Source Control Plugin on the fly, when the window is being switched-to. I can't seem to get this working (I can't find a hook).

If anyone knows how to switch the source control, programatically, or how to activate the TFS Explorer itself.

Kiquenet
  • 14,494
  • 35
  • 148
  • 243
Phobis
  • 7,524
  • 10
  • 47
  • 76
  • Well. That sounds like a challenge. Have you considered using the .NET SDK to do that instead? It's fairly easy to get a `Workspace` and just do a `Get` that way. http://msdn.microsoft.com/en-us/library/bb130146(v=vs.100).aspx – Edward Thomson Mar 22 '12 at 17:11
  • I can access the TFS api programatically to perform my functions. I'm really just trying to make the Visual Studio expierience better by allowing a TFS-bridged user to still use the TFS tools (since my method still uses TFS, this shouldn't be an issue). The issue is that the window disables itself when TFS isn't selected as the current source control plugin (“source control explorer” window). – Phobis Mar 22 '12 at 18:57
  • 1
    any final solution aobut it ? – Kiquenet Jun 05 '13 at 10:10
  • 1
    It seems that this question has the answer : http://stackoverflow.com/a/26071900/930184 dte.ExecuteCommand("View.TfsSourceControlExplorer"); – vpi Aug 25 '15 at 15:56

0 Answers0