Udostępnij za pośrednictwem


Version Control Workspaces and Mapping

A workspace includes client-side folders on the local disk that are mapped to version-controlled folders on the Team Foundation version control server.

  • Workspace Working Folders   In the local working folders for your workspace, you can add, edit, delete, move, rename, or otherwise change version-controlled items without affecting the server source control folder. You can also build and test changes without affecting the server version control items. The system registers changes to local items as pending changes. When you perform a check-in operation, you commit the local changes to the server source control folder. The check-in operation registers the update, and makes the update available to other members of the team.

  • Workspace Folder Mapping   A workspace mapping is a list of active and cloaked items. When you map a local folder to a Team Foundation version control server folder, the system implicitly creates a mapping between all its current and future subfolders. For example, if you map $/projects to c:\projects, subsequently add a project called $/projects/project_one, and then run a get of the workspace, Team Foundation automatically creates a local working folder named project_one in the C:\projects directory.

Workspace Working Folder

You must have a workspace before you can perform Team Foundation version control commands on your computer. Team Foundation stores information about your workspaces. This information includes:

  • A list of all the files in your workspace.

  • The version of each file.

  • A list of the pending changes.

Because the server stores this information, other users who have the correct permissions can duplicate your working environment on their computers. However, they will not be able to see any pending changes. For more information, see Get Command.

Mapping Local Folders to Version Control Server Folders

Workspace mapping establishes a client-side working folder. This is where you put files and subfolders when you execute a Get operation.

You can add and remove workspace mappings for a workspace by managing your workspace in Team Foundation version control or by using the workfold command from the tf command-line utility. For more information see How to: Add and Remove a Working Folder in a Workspace or Workfold Command.

You can also provide cloak mappings. Cloak mappings prevent the retrieval of files and subfolders in the specified server folder when you execute the Get operation. You can establish workspace mappings manually in the Create Workspace dialog box during the workspace creation process. Otherwise, Team Foundation will create the workspace mappings automatically when you add files to version control. For more information, see How to: Create a Mapped Workspace.

Single Folder Mapping

You can decide to map only the immediate children of a version control folder to a local workspace. You can do this by providing an asterisk wild-card character when you specify the folder. Otherwise, by default all the children of the version control folder are recursively mapped to the local workspace.

Note

If you are creating a local workspace by using the Map dialog box, you can clear the Recursive box to create a workspace that is mapped to a single folder. This feature is only available if you have installed the Service Pack 1 version of Microsoft Visual Studio Team System 2008 Team Foundation Server.

Mapping only one level in a version control hierarchy can limit the number of items downloaded to the client computer. This provides faster download times and saves disk space on the client computer.

Maintaining Multiple Workspaces

A single workspace can contain multiple team projects. For more information, see How to: Add and Remove a Working Folder in a Workspace. You might want to maintain multiple copies of source files pointing to different versions of files. This can be helpful if you are working on a new release but must be able to refer back to the source files from a previous release. Also, creating a dedicated test workspace on your computer is useful when you perform peer reviews of a team member's code.

See Also

Tasks

How to: Create a Workspace from the Command-Line

Concepts

Working with Version Control Workspaces