Edit stream specs

You can edit streams in the following ways:

Privately

Publically

Edit a stream privately

By checking out the stream: The changes only become public when you submit the changes. This allows for:

  • testing changes to a stream before checking in those changes
  • traceability of changes to a stream in changelists

Edit a stream publicly

Any changes you save immediately propagate to everyone using the stream. Testing is basic and traceability is minimal.

Edit a stream privately

Editing a stream privately:

  • lets you make configuration changes in isolation from other users of that stream.

  • is the best method for editing streams and when creating Stream components.

  • checks out the stream to the default changelist so that you can test the changes in an isolated environment before checking them in, which makes them public.

  • is not supported for task streams.

Changelists that include a stream include a stream badge for immediate visibility, such as this one: Changelist icon with stream badge

In this case, the changelist icon is blue because it does not contain any open files, only the checked out stream.

When all work on the stream configuration, and any associated code changes, is complete, you can submit the stream and any related files together in a single atomic changelist, which improves visibility and tracking. You can also include a changelist description to indicate additional information, such as why you edited the stream.

The maintained history allows you to later go back and check what you changed, when you did it, and what other, related code changes you submitted at the same time.

If P4V detects any conflicts upon checkin, a question mark appears on the stream icon in the changelist Checked out stream with conflicts icon and you cannot submit the changelist.

P4V provides different ways to resolve conflicts. For details, see Resolve stream specs.

To edit a stream privately

  1. Make sure that your workspace matches the stream you want to edit.
  2. In the Streams tab or the Stream Graph tab, right-click a stream and do one of the following:

    • To check out the stream and edit it immediately:

      Select Check Out and Edit Stream '<stream_name>'.

      P4V checks out the stream, places it in the default changelist, and opens the Stream: Edit window.

    • To check out the stream, move it to a different changelist, and then edit it:

      1. Select Check Out Stream '<stream_name>'.

        P4V checks out the stream and places it in the default changelist.

      2. To move the stream to a different changelist, do one of the following in the Pending tab:

        • Drag the stream from the default changelist to the changelist of your choice.
        • Right-click the pending changelist, select Move to Another Changelist, and, in the Select Pending Changelist dialog box, select the changelist that you want to move it to and click OK.
      3. Right-click the stream again and select Edit Checked Out Stream '<stream_name>'.

        P4V opens the Stream: Edit window.

    In the Stream Graph tab, the workspace icon for the stream turns red as an indicator that this stream is currently checked out. For example, Red workspace icon in Stream Graph indicates checked out stream

  3. In the Stream: Edit window, make the required changes. For information on the available fields, see Create streams.
  4. Click Apply to save the changes and keep the window open, or click OK to save the changes and close the window.
  5. Test to make sure everything is working as expected with the changes you made. If needed, fix any code in other files that needs to be adjusted. Ideally, you make those code changes against the same changelist so that you can then submit the code changes and the updated stream configuration in a single, atomic operation.
  6. On the Pending tab:

    • If the stream icon in the changelist indicates a conflict (Checked out stream with conflicts icon), resolve the conflict before you continue. For more information, see Resolve stream specs.
    • If the changes look good to you and the stream icon in the changelist does not indicate any conflicts, right-click the changelist with the stream and select Submit.

      The Submit Changelist window opens. The stream is automatically selected for submit. Then continue with step 8.

    • If you are not sure about your changes and want to discard them, right-click the stream and select Revert Stream '<stream_name>'.
  7. In the Submit Changelist window:

    • If there are any files that you do not want to submit yet, clear the check boxes for those files.
    • Write a changelist description (recommended)
    • Select any other options that apply.

    To learn more, see Submit (Check in) files.

  8. Click Submit.
Note

The context menu of the Submitted Changelist tab includes options for Stream history, Streams Revision Graph, Diff Against Previous Revision, and Diff Against Head.

See also: Shelve streams.

Edit a stream publicly

Important

Best practice is to Edit a stream privately because you can test the effects of changes before they affect other users and because it allows you to provide a changelist description. Use caution when performing public edits because they could block other users. Only perform public edits when the changes to the stream configuration are straightforward and safe. When you save these changes, they immediately apply to everyone using the stream.

To edit a stream publicly:

  1. In the Streams tab or the Stream Graph tab, right-click a stream, and select Edit Stream '<stream_name>'.
  2. In the Stream: Edit window, make the required changes to the stream spec.
  3. Click Apply to save the changes and keep the window open, or click OK to save the changes and close the window.