The Defunct command removes elements from active use in your workspace. That is, for each element you specify, it:
removes the file, directory, or link from your workspace tree The ordinary directory tree, located in the user's disk storage, in which the user performs development tasks and executes AccuRev commands.
marks the element as (defunct) in the workspace stream The private stream that is built into a workspace. All new versions of elements are originally created in workspaces; AccuRev records these versions in workspace streams.
makes the element active An element is said to be active in a workspace or stream if a new version of the element has been created there, and that version has not been either (1) promoted to the parent stream or (2) purged from the workspace or stream. See default group, backed, passive. in the workspace, by adding it to the workspace's default group The set of elements that are currently active in a particular workspace or stream.
Operating system commands won't find a defunct element (because it really is gone from the workspace tree), but the File Browser can see the element in your workspace stream, where it is both (defunct) and a (member).
Defunct does not remove an element from the depot altogether. [note ] And it does not make an element disappear for all users. Defunct just removes an element from a particular workspace. The element remains visible in other streams and workspaces -- at least until you Promote it.
In the Details pane of a File Browser that is open on a workspace, select one or more file elements. Then:
Click the Defunct toolbar button, or
Right-click the selection and choose Defunct from the context menu.
The Defunct dialog appears, prompting you to confirm your intention to remove the element(s).
If any of the elements you specify is a directory, Defunct works recursively: it removes the directory itself and elements under that directory. Only the specified directory itself becomes (defunct); the objects below it are simply removed from the workspace tree, but do not become (defunct) in the workspace stream.
The precise result depends on whether any elements located below the defuncted directory are active:
If no element below the defuncted directory is active An element is said to be active in a workspace or stream if a new version of the element has been created there, and that version has not been either (1) promoted to the parent stream or (2) purged from the workspace or stream. See default group, backed, passive., the entire directory tree is removed from your workspace tree.
If one or more elements below the defuncted directory is active, those elements become stranded An element has '(stranded)' status in a workspace or stream if it's currently active, but there is no pathname to the element. This occurs when the element's directory (or a higher-level directory) is removed from the workspace or stream by the Defunct command or an exclude rule.. A stranded element is not removed from your workspace tree, but its status becomes (external), since the workspace stream no longer has a valid pathname to the object.
WARNING
In all cases of defuncting a directory, a file below the defuncted directory that you have edited -- but never preserved with Keep -- will be removed from the workspace tree. (Such files are not officially "active" in the workspace.) This removes data for which there might be no other copy.
After Defunct'ing an element, you use Promote to propagate its removal to your workspace's backing stream (parent stream, basis stream) The stream that is just above a given workspace or stream in a depot's stream hierarchy. The given workspace/stream inherits versions from the backing stream.. The element won't appear in a File Browser that is open on your workspace, but it will appear, with (defunct) status, in a File Browser that is open on the backing stream.
You can effectively undo a Defunct command by invoking the Revert to Backed command on the (defunct) element.
If you've already Promote'd the element, so that it no longer appears in the File Browser, you cannot bring it back with the AccuRev GUI. The AccuRev CLI command undefunct performs this operation.
When a user in a sibling Two or more workspaces or streams that have the same parent stream. Pass-through streams 'don't count' -- that is, all workspaces that promote versions to the same stream are considered siblings, even if some of them are direct children of the stream, while others are children of an intervening pass-through stream. workspaces performs an Update, the element will disappear from that workspace.
With each successive promotion up the stream hierarchy The tree-structured collection of streams -- including snapshots and workspace streams -- for a particular depot., a defunct element disappears from the source ("promote from") stream, and becomes active An element is said to be active in a workspace or stream if a new version of the element has been created there, and that version has not been either (1) promoted to the parent stream or (2) purged from the workspace or stream. See default group, backed, passive., with (defunct) status, in the destination ("promote to") stream.
AccuRev's TimeSafe property means that you cannot change the past. This means that a defunct element remains in old snapshots An immutable (frozen, static) stream that captures the configuration of another stream at a particular time. A snapshot cannot be renamed or modified in any way. of streams. You can always get information about the element (if you know which stream it still exists in) using the History Browser.