Resolving (twin) Status

An element has a (twin) status when it and another element have the same pathname in a dynamic stream.

(Twin) Status Overview

Elements with (twin) status are highlighted in yellow in the File Browser, Change Palette, and the default group to make them easy to spot. Both directories and files can have (twin) status.

Elements with (twin) status cannot be promoted until their (twin) status is resolved. To resolve an element’s (twin) status, you can:

  • Defunct one of the elements in conflict. For example, you might decide to defunct the version of the element that is in the workspace, implicitly keeping the one that is in the backing stream.
  • Rename one of the elements in conflict. This action lets you keep both versions in AccuRev.

You can perform defunct and rename operations manually using commands in either the AccuRev GUI or the AccuRev CLI, but the AccuRev GUI provides enhanced features — a twin status resolution wizard, and one-step defunct operations — that help simplify the process of resolving an element’s (twin) status. The remainder of this section describes these features and when to use them.

Back to top

Locating Twin Elements

Elements with a (twin) status are displayed in all File Browser modes, but consider using Conflicts mode to locate them quickly and easily. See Conflicts Mode for more information.

Back to top

The Twin Resolution Wizard

AccuRev provides a wizard you can use to resolve an element’s (twin) status. You should consider using the twin resolution wizard if:

  • You want to compare the elements that are in conflict. Before deciding whether to defunct or rename an element that is in conflict, it can be useful to compare the versions side-by-side. The twin resolution wizard provides a Diff view for directories and files. The information that is displayed varies by type — colors are used to show changed, added, and deleted text in text files, for example. See Diff View Varies Based on Element Type below for more information. AccuRev also displays the element ID (EID) of the versions in conflict.
  • You want to view element history. A Show History button for both versions of the element that is in conflict opens the History Browser, allowing you to review the transactions and changes associated with each version.
  • You want to merge the elements’ contents. The twin resolution wizard’s Merge Contents page includes the same tools as AccuRev’s Merge view, allowing you to review and accept or reject proposed changes. When you choose the element in which you want to save the merge changes, AccuRev automatically detects the other version. Merge is available for text files only.

Note that you can use the twin resolution wizard on individual elements only. You can, however, defunct multiple elements at one time. See Defuncting Twin Elements below for more information.

Diff View Varies Based on Element Type

The following list summarizes how the twin resolution wizard’s Diff view varies for directories and different types of files.

  • Directories. When you resolve a directory with a (twin) status, the twin resolution wizard displays navigable trees for the directories that are in conflict, allowing you to easily compare directory contents.

  • Text files. When you resolve a text file with a (twin) status, the twin resolution wizard displays a Diff view with color-coded text to show you where the files in conflict differ.

    For details about using the Diff view, see The Diff Tool.

    With text files, you can optionally choose to merge contents; in this case, the twin resolution wizard displays a full-featured Merge view, as shown here:

    For details about using the Merge view, see The AccuRev Merge Tool.

  • Binary files. If the file type of the element with (twin) status is binary, the twin resolution wizard displays a table that summarizes information about each version (the date the file was last modified, real and virtual version numbers, and so on).

  • Image files. To allow simple visual inspection of versions that are in conflict, the twin resolution wizard renders images for .jpeg, .jpg, .gif, and .png file types, as shown in the following illustration.

    Images of other types are treated as plain binary files.

Where You Can Run the Wizard

You can run the twin resolution wizard from the:

  • File Browser
  • Default group
  • Change Palette

The basic procedure for running the wizard is the same regardless of where you start. However, there are slight differences to consider when running the wizard from the Change Palette. These differences are identified in the following procedure, How to Run the Wizard.

How to Run the Wizard

To run the twin resolution wizard:

  1. Right-click the element whose (twin) status you want to resolve.

    Note: The twin resolution wizard can be used on individual elements only.

  2. Choose Resolve Twin Status > Use Wizard from the element’s shortcut menu.

    AccuRev displays the first page of the twin resolution wizard. Instructions and actions appear at the top of the view, as shown here:

    Versions of the element in conflict appear in a panel beneath the instructions as described above in Diff View Varies Based on Element Type.

    Note: for Change Palette users: If you are cross-promoting from one stream to another (not from a stream to a workspace), AccuRev first displays the Please Choose a Workspace dialog box. The Please Choose a Workspace dialog box displays a list of workspaces off the destination stream you selected when creating the Change Palette. AccuRev needs this workspace in order to resolve the twin elements. For example:

    Choose the destination stream workspace you want to use and click Ok to continue.

    If the destination stream workspace you select in the Please Choose a Workspace dialog box does not contain a version of the twin element with a (backed) status, AccuRev displays a warning message. AccuRev will not start the twin resolution wizard until you have addressed the situation described in the warning message.

  1. In the Diff view, review the versions of the element that are in conflict and then specify whether you want to keep one or both elements:

    • Keep one element. Choose this option if you know which element you want to keep; AccuRev will automatically defunct the other. Then, click Next and go to Step 4.

      Note: If you want to merge the contents of a text file that is in conflict, choose this option.

    • Keep both elements. Choose this option to keep both elements. Then, click Next and go to Step 6.

Note that if you click the Show History button for an element, you must return to the twin resolution wizard to complete the resolution process. The wizard and the History Browser views are independent.

  1. On the Keep One Element page, select the version of the element you want to keep.

    If you are resolving the (twin) status of a directory, binary file, or image file, or of a text file whose contents you do not wish to merge, go to Step 7.

    If you are resolving the (twin) status of a text file and you want to merge file contents, select the Merge the contents of the two elements check box. Then, click Next and go to Step 5.

  1. In the Merge view on the Merge Contents page, review the results panel, which displays the changes that will be saved to the file you chose in Step 4. You can use the tools of the Merge view to keep or reject individual changes. See The AccuRev Merge Tool for more information.

    When you are satisfied with the proposed merge results, go to Step 7.

  1. On the Keep Both Elements page, select the version of the element you want to rename, and then enter the new name in the Name field.

    Note that you can change only the element’s name, and not its path; the element will remain in the same directory and same stream (workspace or backing, for example) that you choose in this step.

  1. Click Finish.

AccuRev resolves the element’s (twin) status as you specified in the wizard.

Note: for Change Palette users: If you are cross-promoting changes from one stream to another (not from a stream to a workspace), AccuRev displays the Promote dialog box, identifying elements in the destination stream workspace that need to be promoted in order to complete the twin resolution process. Names for these elements are appended with the suffix .old_<EID>, where <EID> is the element ID (EID) of the version you chose to defunct in Step 4. For example, if resolving the twin element resulted in defuncting an element with the name fabricator.c and an EID of 92, the element name displayed in the Promote dialog box would be fabricator.c.old_92.

Back to top

Defuncting Twin Elements

AccuRev lets you explicitly defunct one or more elements with a (twin) status directly from the shortcut menu. That process is described here.

When to Use Defunct

Consider using defunct to resolve an element’s (twin) status when:

  • You know which of the elements in conflict you want to defunct (the version in the workspace, and not the version in the backing stream, for example)
  • You do not need to compare or merge the elements’ contents before defuncting
  • You want to resolve multiple elements with a (twin) status at the same time

How to Defunct Twin Elements

To defunct one or more twin elements:

  1. Select the elements whose (twin) status you want to resolve.

    Note: Use shift+ and ctrl+ to select multiple elements.

  1. Right-click one of the selected elements and choose Resolve Twin Status from the shortcut menu.
  2. Next, choose the version you want to defunct (workspace or backing stream, for example).

    Note: The same version is defuncted for all of the elements you selected in Step 1.

    AccuRev displays a message asking you to confirm the defunct operation.

  3. Choose Yes to defunct the version of the selected elements.

    Choose No to cancel the defunct operation.

    If you are defuncting the twin element from the File Browser, you are done.

    Note for Change Palette users: If you are defuncting the twin element from the Change Palette, AccuRev displays the Please Choose a Workspace dialog box. The Please Choose a Workspace dialog box displays a list of workspaces off the destination stream you selected when creating the Change Palette. AccuRev needs this workspace in order to resolve the twin elements. For example:

    Choose the destination stream workspace you want to use and click Ok to continue.

    If the destination stream workspace you select in the Please Choose a Workspace dialog box does not contain a version of the twin element with a (backed) status, AccuRev displays a warning message. AccuRev will not start the twin resolution wizard until you have addressed the situation described in the warning message.

Back to top