When you create a workspace for a stream in P4V Perforce creates a default name for you based on the user, machine name, and stream name. It also places the workspace root directory under the user home directory. You can manually change both of these elements when you create a workspace if you do not want the default values. A sample of a typical default workspace name and workspace root is shown here.

Workspace name: bruno_win-p4_dev2.3_3996

Workspace root: C:\Users\bruno\Perforce\bruno_win-p4_dev2.3_3996

Within P4V, you have the option of using a single workspace and moving it between streams or creating multiple workspaces, one for each stream you work in. You configure this setting in the P4V preferences dialog under the connection tab.

Context switching is the process of moving a workspace between streams. Using a single workspace and switching it between streams might make sense when you have a lot of data or large files in your workspace and you don't want to have several copies laying around. Using a single workspace for all of your work might also be best if you have build tools already configured for the workspace that can be used across streams.

When you move a workspace between streams, Perforce only updates files in your workspace that differ between the two streams which makes the process very fast in streams that share a lot of common files. When you move a workspace, the workspace name doesn't change but P4V updates the stream name associated with the workspace in the workspace pane to indicate the new association. To move a workspace to a different stream you can either drag and drop the workspace icon to the new stream in the Stream Graph or change the stream name associated with the workspace in the workspace configuration settings.

Note that before switching a workspace between streams, you should, revert, check-in, or shelve open files in the workspace you are moving from.

Using a separate workspace for each stream you work in might make sense if you have different IDE projects, tools, or build configurations for different streams.

If you've configured P4V for multiple workspace support, you can also use multiple workspaces for a single stream, each one dedicated to a different activity, such as test, build, integrate.

Course - Using Streams to Simplify Codeline Management