6. Diff, Merge, and Change Palette : Working in a Change Palette Tab

Working in a Change Palette Tab
The following sections describe the tasks you perform in a Change Palette tab. The order of the sections follows the typical order of tasks. But the Change Palette is a long-lived "work environment", not a simple dialog box or sequential wizard. So you might perform just some of the tasks and/or perform them in a different order.
Specifying the Destination Stream
If you've loaded versions into the Change Palette using the Send to Change Palette command, you've already indicated the source stream, but need to specify the destination stream or workspace. (The drag-and-drop operation indicates both the source and destination.)
Click the arrow control next to the Destination Stream field.
A dialog appears, listing all of the depot's streams and workspaces. Select one to be the destination for subsequent commands (Send to Workspace, Promote, Merge, and/or Patch) on the versions in the Specified Versions pane.
Example
As the example shows, AccuRev determines a status for each element, describing the relationship between the source-stream version and the destination-stream version. Entries with (overlap) status are highlighted in yellow.
Note: If the destination is a workspace, AccuRev evaluates the version currently in the workspace stream, which is not necessarily the same as the file currently in the workspace tree.
You can change the destination stream at any time, using the arrow control next to the Destination Stream field.
Sending Versions to the Destination Stream
In the Specified Versions pane:
If the destination is a stream, you can immediately Promote the versions that do not have (overlap) status.
If the destination is a workspace, you can immediately Send to Workspace any or all versions, whether or not they have (overlap) status.
Select one or more eligible versions, then click the button in the pane's toolbar or choose Promote (or Send to Workspace) from the selection's context menu. When the command completes, the entry(s) for the version(s) are cleared from the Change Palette.
In the Merged Versions pane, you can Promote versions at any time. The versions are active in the workspace listed in the Merged in Workspace column; Promote sends them to this workspace's backing stream.
Notes:
In each Promote invocation, the set of versions must all be in the same workspace.
§
Promoting sends the merged version to the workspace's backing stream, which is not the destination stream you originally specified. You can now promote this version from the workspace's backing stream to the original destination stream (no additional merge is required). But you'll need to use another instance of the Change Palette to invoke the Promote command.
Merging the Source and Destination Versions
If an entry in the Specified Versions pane has (overlap) status, you cannot immediately promote the version to the destination stream. First, you must create a new version by merging the source and destination versions.
The merge operation must take place in a workspace that belongs to you and is based on either the source or destination stream. If you have not already selected a merge workspace, you must do so before performing any merges. (See Merging the Source and Destination Versions on page 222.)
Select one or more versions with (overlap) status, and click the button in the pane's toolbar or choose Merge from the selection's context menu.
The merge operation(s) proceed for the selected element(s), as described in The Merge Command on page 226.
Note: If the merge workspace was not up-to-date, it's possible that the element will continue to have (overlap) status after the merge. In this case, perform a standard Merge in the workspace before promoting the element.
Selecting a Workspace for Performing Merges
A merged version cannot be created directly in either the source or destination stream, because these are dynamic streams — all new versions of AccuRev elements must be originally created in workspaces.
The first time you invoke Merge in the Specified Versions pane, AccuRev prompts you to establish a merge workspace, suggesting one that is based on the destination stream. You can also choose a workspace based on the source stream.
Notes:
A workspace based on the destination stream is preferable. After you perform the merge, you can then accomplish the original task -- propagating a version's changes to the destination stream -- with a single Promote. If you use a workspace based on the source stream, you'll need to Promote twice: (1) from the merge workspace to the source stream; (2) from the source stream to the destination stream. The second one requires you to use another instance of the Change Palette.
Click Cancel in the choose-workspace dialog, and do either of the following:
Reparent one of your existing workspaces to the source or destination stream. Be sure to Update the reparented workspace before using it to perform merges in the Change Palette.
After you select a merge workspace, its name is displayed at the bottom of the Specified Versions pane. You can change this setting at any time; this enables you to use different workspaces to merge different versions.
Patching Changes from the Source Version into the Destination Version
If an entry in the Specified Versions pane has (patch) status, you can invoke the Patch command to incorporate the patch defined by the Version and Basis Version settings into the destination-stream version. Select one or more of these versions, and click the button in the pane's toolbar or choose Patch from the selection's context menu. AccuRev prompts you to select a workspace that belongs to you and is based on the destination stream. The patch operation is performed in this workspace, as described in Patches and Change Packages on page 170.
When the patch operation is complete, the entry disappears from the Specified Versions pane.
Multiple Entries for the Same Element
In some cases, the Specified Versions pane of the Change Palette can get populated with multiple entries for the same element. Here is a simple scenario:
1.
Successive changes to an element, brass.c, get assigned to different AccuWork issue records. For example, this illustration shows a two-version change assigned to issue #14, then a one-version change assigned to issue #7, then a two-version change assigned to issue #22.
2.
3.
Open a Stream Issues window for the stream to which the versions were promoted, then select issues #14 and #22 and invoke the Send to Change Palette command. Since there is a "change package gap", consisting of version 33, between the two change package entries for brass.c, AccuRev cannot combine them into a single patch entry. Accordingly, the two entries are entered into the Change Palette separately:

The total number of entries for a given element is displayed in the Count column. The (patch) indicators in the Status column indicate that Patch is the appropriate command to invoke on each entry, in order to propagate the changes to brass.c in issue records #14 and #22 (and no other changes) to the destination stream.

AccuRev, Inc.
Phone: 781-861-8700
Fax: 781-861-8704
support@accurev.com