The anchor command is essentially the same as the
co (check out) command. It adds elements to the workspace’s
default group, thus preventing them from being changed by an
update command. (The anchor keeps the file from being “swept away”— that is, overwritten — during an update.)
anchor always checks out the version in your workspace stream; thus, it never overwrites the file in your workspace with an old version of the element. By contrast, the
co command supports the
-v and
-t options; this checks out an old version and overwrites the file in your workspace with a copy of that version.
A typical use of anchor is after an
update command complains about unanchored files. Anchoring all such files enables a subsequent
update to succeed.
You can undo an anchor command by issuing a
purge command. This removes the element(s) from the workspace’s default group. But be careful —
purge also discards any changes you may have made to the file(s) since
anchor’ing them.
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
anchor performance. In anchor-required workspaces, overrides the warning message encountered when operating on an element that is active in a sibling workspace.