What About All the Other Commands?

The preceding sections focus on the day-to-day AccuRev tasks — and the accurev commands — that you are most likely to perform as a developer. The remainder of this section provides an overview of the entire CLI, with the discussion organized into broad functional categories. Each command will be discussed in much less depth than in the preceding sections. For full details, see AccuRev Command-Line Reference.

Managing a Depot’s Stream Hierarchy

Creating Data Structures




create a new depot


create a new reference tree


create a new snapshot


create a new stream


create a new user workspace

Maintaining Data Structures




change the properties of a depot


change the name and/or definition of a reference tree


change the location of a slice


change the name and/or definition of a stream


rename or relicense a user


change the name and/or definition of a workspace


restore a reference tree, stream, user, or workspace to active service

remove, rmws

remove a reference tree, stream, user, group, or workspace from active service

The repository can contain any number of depots, each of which is a distinct version-controlled directory hierarchy. Each depot contains a stream hierarchy, which structures the development process for the files in that depot. A depot’s stream hierarchy consists of dynamic streams, snapshots, workspaces, and reference trees.

Most of the management commands in this category begin with “mk” (create/make a data structure) or “ch” (change the specifications of an existing data structure).

The mkdepot command creates a new depot. You can rename an existing depot (chdepot), or change the location of the depot’s on-disk storage (chslice).

The mkstream command creates a new dynamic, pass-through, or gated stream. You can change the specifications of an existing stream: its name, its location in the stream hierarchy, and (for dynamic streams) its basis time (chstream).

The mksnap command creates a new snapshot. Since a snapshot is, by definition, immutable, there is no “change snapshot” command.

The mkws command creates a new workspace. You can change the specifications of an existing workspace: its name, its location in the stream hierarchy, its location in your computer’s (or your network’s) disk storage, and several additional parameters (chws).

The mkref command creates a new reference tree. You can change the specifications of an existing reference tree (chref).

The remove and rmws command remove these data structures from use.

Back to top

Managing and Creating New Versions of Files





add a new element to a depot


add an element to the default group of a workspace


change the access mode of an element (UNIX/Linux-specific)


(check out) add an element to the default group of a workspace


remove an element from a stream


pull back a version from the parent stream to a child stream


create a new version of an element


create an element link or symbolic link


merge changes from another stream into the current version of an element

move, mv

move or rename elements


incorporate the changes from a given workspace into the current version


copy files into a workspace or reference tree


propagate a version from one stream to another stream


undo all of a workspace’s changes to an element


“undo” a promote, demote, or purge transaction


create a command shell in a workspace or reference tree


update the timestamp of a file


restore a previously removed element to a stream


incorporate other people's changes into your workspace

The idea that an element is either active or passive in your workspace is essential to understanding many of the commands in this category. Typically, as you develop a file, you’ll keep one or more versions, then promote the most recent one, then keep another version, then promote that one, etc. During the “keep phase” of this cycle, your workspace has a private version of the file, containing changes that don’t exist anywhere else. The element is said to be active in your workspace. When you promote a version to the backing stream or demote a version to a child stream, the element becomes passive in your workspace. In this state, the public version of the element in the backing stream is the same as the version in your workspace.

Note: The elements that are currently active in your workspace are said to be in the workspace’s default group.

The add command (see Placing Files Under Version Control) places a file under version control. That is, it converts an ordinary file in your workspace into a new AccuRev element. The new element becomes active in your workspace. The ln command creates a link object — one that points to an element (element link) or one that contains a pathname (symbolic link) that may or may not indicate an element.

The keep command (seeCheckpointing — Saving Private Versions) creates a new version of a element in your workspace and makes the element active (if it isn’t already). Several other commands make an element active in your workspace:

  • The defunct command removes an element from your workspace. The undefunct command restores a previously defuncted element to your workspace.

  • The merge command (see Incorporating Other Users’ Work into Your Workspace) creates and keeps a new version of a file — and so does the patch command. The new version combines the contents of the file in your workspace and with all the changes in another version (merge) — or just with the most recent changes in another version (patch).

  • The move (or mv) command changes the pathname of an element — renaming it within the same directory or moving it to another directory in the same workspace/depot.

  • The revert command creates a new version by performing a “subtractive merge” of the specified version from the version in your workspace. See the description of revert for details. To “revert” to the version from the backing stream, use the purge command instead (described below).

All of the above commands make a change to the element, and record that change as a new version in the workspace. (Yes, even defunct creates a new version, recording the removal of the element.)

The following commands also make an element active, creating a new version in the workspace. But these commands don’t record any new change to the element; they merely transition the element from passive to active:

  • The anchor command takes an element that is currently passive (a version is being inherited from the backing stream) and declares it to be active. Note that this doesn’t make any change to the file in the workspace.

  • The co (“checkout”) command extends anchor by enabling you to make any historical version of an element — not just the current version — active in your workspace. The co command copies that version from the repository to your workspace, enabling you to examine and/or edit it.

The promote, demote, and purge commands transition an element from active status to passive status in the from-stream. promote (see Making Your Changes Public) takes a private version — created by keep or move or defunct, etc. — and makes it public by sending it to the backing stream. demote removes (or pulls back) a version from the default group in a parent stream and makes that version active in a child stream. purge effectively discards all the private versions of the element you’ve created recently; your workspace reverts to the version it was using before you made the element active.

The update command (see Incorporating Other Users’ Work into Your Workspace) copies recently-created versions into your workspace, replacing older files with newer files. It only updates elements that are passive in your workspace, leaving alone elements that are active unless you use update –m. The pop command is designed to “fill in the gaps”: it copies in the appropriate version of specified elements that are currently missing from the workspace.

The chmod command manipulates the UNIX/Linux-level executable bits on an element. The touch command updates the timestamp on a workspace file. This can affect the results of several file-status commands that use timestamps to optimize their performance. The start command launches a new command shell, with the current directory set to a specified workspace.

Back to top

Getting Status Information





determine the ancestor of a version


indicate the origin of each line of a text file


get the contents of a version of an element


compare two versions of an element


show the status of elements


show the properties for streams, users, or groups


show the transaction history of elements or an entire depot


show basic information about the current session


determine which versions need to be promoted between streams


list the name of the element with the specified element-ID


list versions that need to be patched into the workspace’s version


list objects of a particular kind (depots, for example)


show the status of AccuRev elements or file system objects


list transactions containing versions that need to be promoted


alias for cat command


report work-in-progress for workspaces backed by a stream

The info command lists basic data about your AccuRev setup: username, client and server machine information, workspace and backing streams, etc.

The show command lists the names of items in the repository: depots, streams, workspaces, etc.

The files and stat commands (see Determining the Status of Files) list the status of elements in a workspace, or in a stream. The name command lists the pathname of an element, given its unique element-ID. This is particularly useful when an element has been renamed, and so appears under different names to different users. The anc command has options to determine several kinds of ancestor versions of a specified version (or the common ancestor of two versions). The wip command (see Tracking Other Users’ Work) lists the files under active development in the entire set of workspaces based on a particular stream.

The hist command lists the transaction history of individual elements, or of entire streams or depots.

The cat (or type) command retrieves the contents of a specified version of a file. The annotate command lists the contents of a specified version, indicating information about how each line of the file was created or modified.

The diff command compares two versions of a text file.

The translist command considers the set of elements that have versions pending promotion in a particular workspace or stream; it lists the transactions that created those versions. The mergelist command lists the files that need to be merged from one specified stream to another. Similarly, the patchlist command considers two versions of a text file, and lists all the individual versions that have changes present in one version but not the other.

Include/Exclude Rule Facility




remove an include/exclude rule


set rule to include elements in a workspace or stream


set rule to include a directory, not its contents, in a in a workspace stream


set a rule to exclude elements from a workspace or stream


show the include/exclude rules for a workspace or stream


set or clear multiple include/exclude rules for a workspace or stream

AccuRev’s include/exclude facility makes it easy to include just the files you need in a workspace or stream. The incl, incldo, and excl command create these rules. The clear command deletes a rule. The lsrules command lists the rules. The mkrules command specifies multiple include/exclude rules to apply in a single file.

Back to top





prepare to transfer version container files to offline storage


backs up the AccuRev metadata


display performance diagnostics


activate a trigger in a depot


add a depot to a replica repository


remove archived version container files from gateway area

replica sync

synchronize a replica repository


remove properties from a stream, user, or group


remove a depot from a replica repository


deactivate a trigger in a depot


create properties for a stream, user, or group


synchronize system clock on client computer to server computer


restore version container files that were previously archived


download the AccuRev client installation package

AccuRev has remarkably little administrative overhead. There’s no need to stop the AccuRev Server process, even when using the backup command to back up the AccuRev metadata.

The mktrig and rmtrig commands maintain the triggers, which control users’ ability to make changes to depots.

The synctime command adjusts a client machine’s system clock to match that of the AccuRev server machine.

The diag command displays AccuRev performance figures.

The archive, unarchive, and reclaim commands manage the archiving of storage container files that can be moved to offline storage — for example, because they are no longer needed.

At a site that uses a replica of the master AccuRev repository, the mkreplica and rmreplica commands maintain the set of depots that are replicated at that site. The replica sync command performs a manual synchronization of the replica repository with the master repository.

Back to top

Managing Users and Security




change group membership


rename a group


change the password of a user


rename or relicense a user


turn off SSL security


accept SSL certificate


get new SSL certificate


check if named user is a group member


lock a dynamic stream against promotions


log in to an AccuRev Server


log out from an AccuRev Server


show access control list entries


create a new group of users


register a new username


remove a user from a group


remove properties from a stream, user, or group


create or remove an access control list entry


create properties for a stream, user, or group


unlock a dynamic stream to enable promotions

The AccuRev database’s site schema contains a registry of users (with optional password protection) and user groups. Access to repository data structures is controlled by stream locks and ACLs (access control lists). Access to particular CLI commands is controlled by triggers.

The mkuser command allocates a unique numeric user-ID, and assigns it a new username; it optionally sets a password for the user. The chuser and chpasswd commands change the name and password settings for an existing user-ID.

Similarly, the mkgroup and chgroup commands maintain the AccuRev user-group names. User membership in groups is maintained with the addmember, rmmember, and ismember commands.

The lock and unlock commands control stream locks, which control the promotion of versions to and from particular streams.

The setacl and lsacl commands maintain access control lists, which control users’ and groups’ ability to make changes to particular streams, or to particular depots.

Back to top

Managing Change Packages




add an entry to a change package


list the contents of a change package


remove an entry from a change package


compare two streams in terms of their change packages


list the change packages in a stream

AccuRev change packages are implemented using the AccuWork issue management facility. Each issue record has a Changes tab, which can record a group of changes made to a set of elements. The cpkadd and cpkremove command maintain these Change tab entries, which are termed change packages. The cpkdescribe command lists the contents of a change package. The issuelist command shows which change packages (issue records) have their changes included in a particular stream. The issuediff command compares two streams in terms of their change packages.

Back to top