As described above, an AccuRev workspace or stream can contain one or more elements that are stranded. An element is stranded in a particular workspace or stream if it is a member of the default group, but cannot be accessed because there is no pathname to the element in that workspace or stream. An element can be stranded in one stream but not be stranded in other streams.
In the AccuRev GUI, stranded elements are listed in the File Browser’s Stranded filter. In the CLI, the command
stat –i lists stranded elements. A stranded element is listed by its element-ID, along with a pathname that was once (but is not currently) valid in that stream.
At this point, the defuncted element is stranded in the parent stream. It cannot be promoted to the “grandparent” stream by name, because it doesn’t have a name in the parent stream. The new element cannot be promoted to the grandparent stream at all, because the name in the grandparent stream belongs to the defuncted element.
To recover the defuncted element in workspace #1, use undefunct –e <eid> on the defuncted element. This has the side effect of making the new element inaccessible in workspace #1. Depending on your needs, use
defunct –e or
move –e on the new element.
The only way to work with the file element in either workspace is to first remove the exclude rule (
clear command) from the parent stream, and then update the workspace. This makes the file visible again.
The only way to untangle this knot of inconsistency is to checkout (co command) a previous version of each directory that has the “correct” (that is, consistent with the other directory) pathname, then promote these old versions to the parent stream.
The simplest way to do this is to specify the transaction that created the directory at its correct pathname:
co –t <add-transaction-number>. But this method can be “messy” if the
add transaction also created other elements, such as the files within the directory.
Another method is to use a workspace under a time-based stream to see the relevant directories with their correct pathnames. Checkout the “old” directory versions, promote these versions from the workspace to the time-based stream, then use
promote –s <time-based-stream> –S <parent-stream> to promote to the parent stream.
The only way to work with the file element is to first checkout (co command) the version of the directory that was originally created in the workspace. The simplest way to do this is to specify the transaction that created the directory:
co –t <add-transaction-number>. But this method can be “messy” if the
add transaction also created other elements.
Another method is to use a workspace under a time-based stream to see the directory before it was purged from the parent stream. Checkout the directory, promote it from the workspace to the time-based stream, then use
promote –s <time-based-stream> –S <parent-stream> to promote to the parent stream.
This occurs when an element (file, directory, or link) is active in a dynamic stream. The dynamic stream’s virtual version is a reference to a version that has been purged, so that there is no active version of the element in a higher-level stream (and no version in the depot’s root stream).