Demote by Issue

The concept of demoting changes was discussed in Demote: Moving Elements Out of a Stream for more information where it was noted that AccuRev supports the ability to demote by file, by transaction, and by issue. If you promote by issue, you have the option to demote by issue if you want to back out specific sets of changes.

Demote by Issue Overview

When you demote by issue, you move the associated changes from a parent stream to a child stream or workspace. In this way, you can, in effect, ‘undo’ the changes that were promoted to the parent while retaining these changes in a child stream or workspace.

Say, for example, that changes associated with issue 10 introduced a defect that broke your build and you would like to move these changes out of your build stream. You can simply demote issue 10 to a child stream or workspace, fix the defect, and then promote issue 10 back into the parent stream once more.

Back to top

Demoting Issues to a Child Stream or Workspace

This following section describes the process of demoting by issue through the StreamBrowser. You can also demote by issue through the Command Line Interface. See the description of demote for more information.

In the StreamBrowser, select the issue(s) you want to demote. You can either click the Demote button:

or right-click the issue(s) and select Demote Issue(s) from the context menu:

If more than one child stream or workspace exists for the current stream, the Choose a destination for the demote dialog box appears:

After you select a destination stream or workspace and click OK, the changes associated with the issue(s) are no longer present in the parent stream but are now active in the default group of the destination stream or workspace you specified.

The StreamBrowser shows the fact that issue 10 now exists in the child workspace:

If you right-click a file in issue 10, select History > Browse Versions from the context menu, and hover over the demoted version, the tool tip confirms the demotion:

Note that you cannot “cross demote” an issue and neither can you demote issues by using drag and drop.

A demote by issue operation may fail under certain circumstances, including the following conditions:

  • An overlap status exists for one of the files selected for demote in the destination stream or workspace
  • The issues to be demoted contain dependencies that are not selected for demote. All dependencies must be included in the demote operation or it will fail.
  • A file in the issue contains non-contiguous segments, which is a condition that arises when the file has been promoted against, say, issue 1, then issue 3, then issue 1 again.

Back to top