Streams provide an alternate approach to maintaining codelinesA set of files that evolve collectively. One codeline can be branched from another, allowing each set of files to evolve separately..
Starting with release 2012.1, P4Eclipse provides the following support for streams:
If your organization uses streams, you will see streams depots in the
P4 Connections view. Streams depots are marked with the
icon. A hierarchical view of the streams and their relationships to each other
is displayed in the P4 Streams view, along with each stream's name,
root, parent, owner, type, and description. If P4V (the Perforce Visual Client
executable) is available, you can also obtain the P4V Streams Graph by clicking
the Stream Graph button
in the P4 Streams view.
![]() P4 Streams view buttons:
|
From the P4 Streams view (or the
Create New Stream from... context
menu item), click the Create a New Stream
button . The New
Stream wizard will pop up. To create a new Stream spec,
follow the wizard's prompts and click Finish.
Click the Refresh button
on
the view toolbar to refresh the view and display the new stream.
A stream spec defines a path in the stream depot. If the path does not exist, you need to populate the stream with content.
To populate a stream in Eclipse:
You can check the Branch files from parent on stream creation button in the New Stream wizard.
Alternatively, you can:
Populate a stream with P4V:
If you are familiar with P4V, you can use it to populate the stream.
In order to enable context menu functionality in the stream graph, you will need to select the P4V Preference named Use the same workspace, and switch it between streams. (You can set this preference in the Streams page of P4V Preferences.)
You can only delete a stream if it has no children.
The P4 Streams view can show streams either as a tree
or list
. If you have P4V
configured in the preferences page, the P4V Stream Graph view can
also be invoked from the P4 Streams
view toolbar
.
To work with a stream depot, a stream client is needed. To create a stream client, select a connection from the P4 Connections view, select Edit Perforce Workspace... from the context menu, set the Stream field (and optionally, specify the AtChange field), and save the spec.
Alternatively, you can select the context menu Work in this Stream... of the P4 Streams view, P4Eclipse will prompt you to either update the current Perforce client to associate with selected stream, or create a new client to associate with the selected stream, based on the preference. The default behavior is to update the current client to associate with the selected stream.
Once you select the stream client, P4Eclipse will automatically switch the Perforce workspace and synchronize the existing projects to the latest revision.
Consider the following set of streams:
After fixing a bug or implementing a new feature in a development stream, you may want to copy up your changes to the main stream or you may want to merge them down from the main stream to the development stream.
P4Eclipse release 2012.2 and earlier:P4Eclipse will not automatically switch to the target stream when copying to the stream or merging to the stream. You must manually switch to the target streams when copying and merging to the stream.
When you select the Copy to Stream... or Merge to Stream... actions, P4Eclipse will automatically switch to the target stream if necessary.
Task streams provide a light way to branch streams. Usually you work with a task stream for a minor bug fix or a small feature development.
P4Eclipse provides following support for task streams, and most of them are available from the P4 Streams view:
The following workflow is suggested but not required: