Working with Gated and Staging Streams

Generally speaking, gated streams adhere to the same rules as other AccuRev streams. For example, you can rename and reparent them as you would other streams, but there are a few considerations of which you should be aware:

  • You cannot reparent a staging stream. A staging stream is always the child of the gated stream for which it was created.

  • You can delete a staging stream only if it has no children.

  • You can delete a gated stream only if its staging streams meet the conditions for deletion.

Showing Empty Staging Streams

AccuRev hides empty staging streams by default. AccuRev considers a staging stream to be empty if it has no default group. If you want, you can choose to display empty staging streams.

To show empty staging streams:

  1. Right-click the gated stream whose empty staging streams you want to show.

  2. Choose Show All Staging Streams from the menu.

To hide them again, right-click the gated stream and choose Hide Empty Staging Streams.

Note: The Include hidden streams check box in the StreamBrowser shows (or hides) streams that have been removed from the depot. It has no effect on whether or not staging streams are displayed in the StreamBrowser.

Back to top

When Jobs Do Not Succeed

The external jobs associated with staging streams will not always succeed — promoted changes might fail to compile, or they might break a build, for example. When jobs do not succeed, the staging stream's default group retains the active elements until the changes are promoted again, at which point the server_master_trig trigger runs again, the external job runs again, and so on.

Any time the staging stream has active elements in its default group — as is the case if the external job fails, for example — AccuRev "listens" for changes in the stream hierarchy that might affect the external job. If changes are promoted to a stream above the gated stream, AccuRev re-executes the server_admin_trig trigger when those changes are inherited by the staging stream.

Consider the following illustration:

Here, (1) user oarmstrong has promoted changes to the staging stream nightly_build_staging_2. Unfortunately, his changes broke the build, and the trigger returned a status of "failed". Note that his changes remain in the staging stream's default group. Shortly thereafter, before he has the opportunity to promote his fixes, (2) user hchance promotes her changes to the hot_fix stream. When her changes are promoted again to the integration stream, they are automatically inherited (3) by the nightly_build gated stream, and again (4) by its three staging streams.

Because AccuRev is listening for changes that occur in the backing streams of staging streams that have active elements in the default group, as soon as hchance's changes are promoted to the integration stream, the nightly_build_staging_2 staging stream will inherit these changes and re-execute the trigger (using these latest changes).

Back to top

Overriding Running Status

There might be occasions when you want to manually override the Running status on a staging stream. For example, if your software development process requires a code review before changes can be promoted, your reviewer needs a way to set the staging stream status when the review is complete.

You can manually set the staging stream status using the stagingStreamResult reserved stream property:

accurev setproperty -r -s <stream name> stagingStreamResult "<status>"

If the stream name contains spaces, you must enclose it in quotation marks. Valid values for <status> are "running", "success", "failed", and "warning".

For example, if you want to set the status of staging stream acme dev to success, you enter:

accurev setproperty -r -s "acme dev" stagingStreamResult "success"

The staging stream status result is reset the next time changes are promoted to the staging stream.

What about streamCustomIcon?

The reserved stream property streamCustomIcon can be used to manually set the icon, tooltip, and URL for any stream, including gated and staging streams. However, changes to a staging stream made using streamCustomIcon do not affect the roll-up status reflected on the gated stream.

Back to top