3. The File Browser : The Add to Depot Command

The Add to Depot Command
The Add to Depot command places the selected files and/or directories under version control. For each file/directory, this includes:
· Creating an element in the depot.
· Creating the version 1 of the element in your workspace stream.
The status of each file/directory changes from (external) to (kept).
Invoking the Add to Depot Command
In the Details pane of a File Browser that is open on a workspace, select one or more files and/or directories. All the selected objects must currently have (external) status. Then:
· Click the toolbar button, or
· Right-click the selection and choose Add to Depot from the context menu.
The Add to Depot dialog appears, which you use to complete the command.
Using the Add to Depot Dialog
The Add to Depot dialog includes basic options (always visible) and advanced options (visibility controlled by a Basic/Advanced button).
Basic Options
Comment
You can enter a comment string in the text box. (AccuRev "seeds" the text box with your most recent Add to Depot comment made during the current AccuRev GUI session.) The comment string becomes a permanent annotation to the version you're creating.
AccuRev itself does not require a comment, but your organization can establish such a requirement by putting a trigger on the Add to Depot command.
Advanced Options
Choose File Type
By default, AccuRev determines the element type for the newly created version automatically (text or binary). You can override the default by specifying either of these types or ptext (a variant of text). See AccuRev Element Types on page 137.
Choose Lock Type
Choosing Enable File Locking places a lock on the element, to enforce serial development in sibling workspaces for that element. This ensures that users in sibling workspaces won't have to merge their work on this element. The lock remains on the element until you (or someone else) changes this value to Disable File Locking in a subsequent Keep command. See The Locks Dialog Box on page 53.
Add links as symbolic links
By default, a symbolic link (UNIX/Linux) or junction point (Windows) is added to the depot as an AccuRev element link, not as an AccuRev symbolic link. Use this checkbox to cause such objects to be converted to AccuRev symbolic links.
Results of an Add to Depot Operation -- the Details
The Add to Depot command does the following:
Creates a new element in the depot— A new element object is created in the depot to which your workspace belongs. AccuRev will track all future changes to this element -- both content changes and namespace changes.
Creates the first version of the element—A new version object is created in the workspace stream. It has a unique version-ID, such as talon_dvt_mary/1 ("the first version of this element created in workspace talon_dvt_mary"). A version object is immutable, and cannot be removed from the repository. The version created by Add to Depot is termed a real version, because it represents an actual change to an element.
Preserves the contents of the new version—The contents of the new version are preserved permanently in the repository. AccuRev copies the file in your workspace tree to a container file in the depot. No AccuRev operation modifies or removes the container file (exception: archive command).
Sets the element status—The file element gets the status flag (kept) in your workspace. It also gets the (member) flag, indicating that the element is active in your workspace.
Note: "Undoing" an Add to Depot operation
There is no true "undo" operation in AccuRev version control, since that would violate the TimeSafe principle. But invoking the Revert to Backed command on a file that you just added to the depot (and have not promoted) is a very close approximation. The newly created element disappears from your workspace; you can retrieve its initial version only by using the unique element-ID. (CLI commands hist -fv and cat -e).

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