0

I'm writing a MEF extension for Visual Studio. It's a Classifier for a custom language. I need to get the current changeset for the file - I think from TFS.

If you right-click on the file and choose properties it says "latest version" - I believe this is the latest changeset associated with the file.

I'd like to create a TFS workspace, and then get the changeset number, but I'm stumped on how to figure out the current workspace mapping from the physical path of the file in the editor.

For example, if the file is "d:\workspace\solution\random_folder\junk.txt", how do I know where the workspace for the file is mapped in TFS?

Should I just map a workspace and then search for a file called "junk.txt"? What if there is more than 1 file in different sub directories.

Thanks for any help!

user789235
  • 223
  • 1
  • 4
  • 9

1 Answers1

0

You can't put one workspace beneath an existing workspace, this can't be handled correctly. To create an additional workspace open VS and go to SourceControlExplorer. In the menu is a dropdown for Workspaces, choose "Workspaces ..." and a new dialog will open. Press the "Add.." button to create a new workspace and there you can choose which ServerPath is mapped to which local path.

MikeR
  • 3,045
  • 25
  • 32