2. AccuRev® Command-Line Reference : co

co
(check out) add an element to the default group of a workspace
Usage
accurev co [ -c <comment> ] [ -n [ -O ] ] [ -9 ] [ -R ]
[ -v <ver-spec> ]
{ -l <list-file> | <element-list> | -e <eid> | -t <transaction-number> }
Description
The co (“check out”) command adds elements to your workspace’s default group, the collection of elements that are under active development in that workspace. With the -v or -t option, it also overwrites the file in your workspace with an old version of the element. Be careful when using these options:
Typically, you’ll need to perform a merge before you can promote the file.
If any element is already in the default group (e.g. you have kept one of the files), the co transaction is aborted.
An important effect of the co command is to “shield” the specified elements from being changed by an update command. update always skips over the members of the default group when deciding which elements to update.
Exclusive File Locking and Anchor-Required Workspaces
See File Locking in Workspaces.
Removing Elements from the Default Group
To remove an element from the workspace’s default group, use the purge command. This also overwrites the file in your workspace with the version in the backing stream.
Timestamps on Copies of Old Versions
The -v and -t options cause an old version of the element to be copied into your workspace. By default, each file copied into your workspace by this command has its timestamp set to the current time. If environment variable ACCUREV_USE_MOD_TIME is set, the timestamp is set to the time the version was originally created. (Note: that’s the time the version was created in some user’s workspace stream, not the time it was subsequently promoted to the backing stream.)
Options
–c <comment>
Specify a comment for the transaction. The next command-line argument should be a quoted string. Alternatively, the next argument can be in the form @<comment-file>, which uses the contents of text-file <comment-file> as the comment.
-O
When used with the -n option, overrides timestamp optimization. When -O is used, all files are considered, even those whose modification times have not changed since the last time the workspace was updated or searched for modified files. Having to check all files, regardless of modification time, slows co performance. In anchor-required workspaces, overrides the warning message encountered when operating on an element that is active in a sibling workspace.
-9
Add the specified version of the element(s) to the default group, even if a version of the element is in the default group already. Used to “check out” a version which had been previously added or kept but not promoted.
-n
Select all of the modified elements in the workspace that are not already in the default group.
-R
In addition to processing the specified files (if any), recurse into any specified directories and check out all (modified) files in those directories that are not already in the default group. (You must also specify -n.)
-v <ver-spec>
Check out the specified version, copying the file to your workspace.
-t <transaction-number>
Check out all the versions of elements involved in the specified transaction. (You must specify the transaction by number, not by time.) You cannot combine this option with -v.
-e <eid>
Operate on the element with the specified element-ID. You can use this option instead of specifying the name of an element. If you also specify a <list-file> or <element-list>, it is ignored.
-l <list-file>
Process the elements listed in <list-file>. This must be a text file, with one element name per line. Extra whitespace is not allowed; make sure there are no empty lines and no leading or trailing white space around the filenames. Wildcards are not expanded. There is no provision for comment lines in the file.
If you use this option, any <element-list> specified is silently ignored.
<element-list>
One or more element names, separated by whitespace. If you also specify a <list-file> using the –l option, this <element-list> is silently ignored.
Examples
Add to the default group all files in the workspace that have been modified but are not yet in the default group:
> accurev co -n
Get and checkout the version of file foo.c that is currently used by stream gizmo_bugfix:
> accurev co -v gizmo_bugfix foo.c
Get and checkout a specific previous version of file foo.c, which was created in jsmith’s workspace:
> accurev co -v gizmo_jsmith/5 foo.c
See Also
Using a Specific Version of an Element.

Micro Focus