Perforce Public Knowledge Base - Streams - A P4V introduction
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Streams - A P4V introduction

« Go Back



How do I create and populate streams in P4V?



How do I create and populate streams in P4V?


To work with streams, first create a stream depot. From P4V, subsequently define streams, populate the mainline stream with files, and use the Streams view to copy or merge files from one stream to another.


Start Perforce Administration Tool (P4Admin) within P4V

In P4V : select Tools > Administration > Depots
In P4Admin : select File > New > Depot
Enter a name for your new stream depot name, for example Ace 
Choose the Depot type: stream
Click Apply
Select Quit P4Admin to exit P4Admin


This example assumes that you use the default behavior, "Use a different workspace for each stream". You can set / change this option by selecting P4V > Preferences > Streams:


See Workspace Configuration and Streams for more information about managing a steam client.


In P4V : select File > New > Stream 
Enter a name for your new stream, for example MAIN
Choose the Stream type: mainline
Select/Browse the desired depot for the field "The depot where
the mainline stream will be located" (Ace in this example)
Tick "Create a workspace to use with this stream" checkbox
Tick "Populate the mainline stream after it is created" checkbox
Click OK


  1. Create a stream depot
  2. Set stream client preferences
  3. Create a new mainline stream
  4. Import files into the mainline
The Populate dialog will appear:


Assuming that you have an existing depot to branch from, for example The Perforce Sample Depot Without Streams,

Tick "Branch files from the server's depots" checkbox
The Branch dialog will appear, add the mainline from the Jam project in the Sample depot:
Branch method: Specify source and target files
Source files/folders: Add > depot > Jam > Main > src > OK
Automatically submit after branching files : Checked
To finish populating the stream,
Click Branch button
Note that a new workspace (also known as a stream client) is automatically created and associated with this stream.


In P4V : select View > Streams

  • Visualize streams using Stream Graph
As shown above in the Stream Graph, you should see a rectangular box that represents your mainline stream (named MAIN in this example). Inside the MAIN icon, you should see a monitor icon, representing the associated workspace. If you do not see the monitor icon, right-click the mainline stream icon and right-click New Workspace to create a new workspace. Optionally change the Workspace root to a location you desire, and click OK. If you do not see your mainline stream MAIN icon, click the yellow funnel icon in the left corner above the Stream Graph. Change the selected depot to be the stream depot that you created in step 1, and click the Apply filter button.

For more information, see the Using Stream Graph documentation.


In P4V Stream Graph: 
Right-click on the Main stream icon
Select Create New Stream from 'main'...

The Stream specification dialog appears:

  • Create a development stream from the mainline

Make the selections shown above, although indicate your actual parent stream. At the bottom of the dialog (not shown above):
Tick "Create a workspace to use with this stream" checkbox 
Tick "Branch files from parent on stream creation" checkbox
Click OK


In the Stream Graph, drag the stream monitor icon to the stream you want to work with.

For example, if you want to work in the MAIN stream, drag the monitor icon to the MAIN stream icon. Then look under the Depot tab in the left pane for the desired depot name, Ace in this example, and expand the MAIN stream. Choose Get Latest Revision > Check Out and make some edits and submits.


  • Navigate streams and edit files
  • Merge files from the mainline
The arrows that appear between streams in the Stream Graph are called merge or copy indicators. If any of those indicators are green, a merge or copy operation is pending. Double-click the rectangle representing the stream at the end of the green indicator to initiate the merge or copy operation. Click here for more information about merge/copy operations within the Stream Graph.
Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255