A few command-line options are recognized by many of the accurev commands, and work identically (or nearly identically) in each command. These options act as filters, selecting a subset of the depot’s elements based on their element status. This makes it easy to select sets of elements for a command to operate on. You can use these filter options alone or in combination with filename arguments. Examples:
Invoke the keep command on all items in the current directory:
Invoke the keep command on all items in the current directory with
(modified) status.
Invoke the add command on all items in the current directory with
(external) status and a
.png filename suffix.
Invoke the stat command on all items in the workspace, in all directories.
The –m option selects modified elements. By default, it selects all modified elements. When combined with other selection criteria, it narrows the selection to just the modified elements. This is how we obtained the earlier example with
keep. To keep all modified elements:
To simply find out which elements match a given set of criteria, use the stat command. As in the previous example, to list all modified elements in the current directory:
To select all kept elements, use the –k option. This command promotes all the elements in the depot that you’ve kept:
When combined with other selection criteria, –k narrows the selection to just the kept elements. To promote all kept elements in the current directory:
The purge and
promote commands remove elements from the default group.
You can restrict a command to using the elements in the default group, by using the –d option. This is very useful when you’re working on a large depot: determining the contents of the default group is a relatively quick operation, whereas examining all the elements in the depot is comparatively time-consuming. For instance, if you are working on a depot with 1000 files but you only have 10 files in your default group, using the options
–m –d to select the modified elements in the default group only has to check 10 files. This will run much faster than using just the
–m option, for which
accurev must examine all 1000 files.
The end goal of any change is to promote that change to the backing stream. All changes, whether kept or not, are considered to be pending. Pending is short for “pending promotion”. The pending option is necessary because
–k does not select modified elements and
–m does not select kept elements. To list all elements that are pending promotion in the current workspace:
Elements that you have changed and have also been changed in the backing stream since you last updated your workspace are called overlapping. Before you can promote these elements, you must
merge your changes with the new changes in the backing stream. To get a list of all overlapping elements:
Note: purge restores the version of an element that was in the backing stream at the time of your workspace’s most recent update. You might need to perform another
update to bring the version causing the underlap status into the workspace.
Files and directories that haven't been processed with the add command are called
external. These can be selected with the
–x option. This is useful for creating new elements — that is, placing files under version control:
To select all the elements in a depot, use the –a option. (If you use
–a, you cannot also list elements on the command line.) This command displays the status of all of the elements in a depot:
The –a option does not include external objects.
–p elements that are pending promotion to the backing stream
–m elements that you’ve modified (and possibly kept, too)
–n element that you’ve modified but have not kept
–o elements with overlap status
–U elements with underlap status
–B status up the backing chain, including deep overlaps
–x files that you have not placed under version control (external)
–M elements under version control, but no file appears in your workspace (missing)
AccuRev provides optimizations that help to speed the performance of workspace and stream searches. See the
files and
stat reference pages for more information.
The accurev program recognizes the following filename patterns: