retrv(1) | ShapeTools | retrv(1) |
retrv - retrieve a revision of a file
retrv [ version binding options ] [ options ]
files ..
Retrv retrieves a specified, previously saved version of a file from the version object base. The version archive is expected to reside in the AtFS subdirectory. A selected version will by default be retrieved into a file in the directory where it was originally saved. If just a copy of a file version shall be retrieved, this behavior can be overridden with the -dest option. If a busy version is created with the -lock option, it must be created in the directory from where it was saved. This is necessary to maintain the spatial relationship between the busy version and the corresponding history archive, residing in the AtFS subdirectory.
Retrieve tries to be careful if an attempt is made to overwrite an existing busy-version: unless -f (-force) is specified, retrv will ask the caller for permission. If no busy version exists, one is created with the same modes as the formerly saved version. If a busy version exists, its modes are preserved.
If the program is invoked as vcat, the specified version(s) will be printed on standard output. No status change of the object base will occur in this case. vcat behaves similar to the cat(1) command: if just a filename is given, vcat displays the most recent status of the referenced object. If a busy version does exist it will be selected as most recent status. If no busy version exists, vcat displays the most recently saved version.
It is possible to cite any of a file-version's attributes within the the body of the version. This can be done by using attribute citation expressions. These expressions have the form "$__attributename$". Version attributes that are cited within the text of a stored revision are expanded by default. In this case, the citation expression will be substituted by the cited attribute's value. For a list of predefined attribute names, check the vadm(1) manual page.
There are three basic kinds of attribute values: genuine values, reference values, and execution values. Genuine values are simply strings that are assigned to an attribute. Reference values are pointers to files or AtFS-versions whose contents will be substituted in place of an attribute-citation. Reference values are strings that begin with a circumflex-character, typically followed by pathname, e.g. ^/usr/local/lib/std-header[2.4]. Execution values are names of executable programs, whose standard output is substituted in place of an attribute-citation. Execution values are strings that begin with an exclamation-mark character, typically followed by the name of the program, e.g. !/bin/date. Execution values can be used to generate highly dynamic attributes or a primitive form of event-triggers.
When expanding an attribute citation, retrv first looks for an attribute of the mentioned name within the version's set of associated attributes. If no attribute of that name can be found, the environment is searched for a variable of that name. In case the cited attribute exists and has a value, the value is itself searched for attribute-citations that are expanded recursively. If neither an attribute nor an environment variable of the cited name can be found, no substitution takes place and the expression will be left unchanged. The same is true if a referenced object of a reference value does not exist, or an execution value happens to not be executable. Attribute citation expressions are also left unchanged if a revision is retrieved with the -lock option. Expansion of attribute citation within documents can be controlled by the pseudo-attribute citations "$__xpoff$" and "$__xpon$".
For version selection, any version binding option, as described on the vbind(1) manual page, may be given, or a version bind directive may be given in brackets added to the file name.
Additional options are:
The -fix switch is intended to support concurrency of the main development process and maintenance activities (such as bug fixing) for older releases. When a version is retrieved with the purpose to fix it, it is called the fixpoint version. The fixpoint version accumulates all fixes applied to a baseline version within a generation. One important advantage of this policy is the elimination of the need to create a branch for each fix that must later be merged with the ``mainline'' version, containing previous fixes. So, if retrv is invoked with ``-fix'' it will restore the fixpoint version (the most recent minor revision within the implied generation) rather than the explicitly referenced version. However, retrv issues a warning, if the baseline- and the fixpoint version are not identical.
To insert a fix into an old generation, use the -fix option of the save command. When setting a lock on a generation, the requesting user is prompted for an optional description of the planned changes. The -fix switch is incompatible with -lock.
All revisions of documents are retrieved from archive files located in the subdirectory AtFS.
vbind(1), save(1), vadm(1)
Redirection of stdin in conjunction with option -stdin doesn't work.
Axel.Mahler@cs.tu-berlin.de
Thu Jun 17 14:03:56 1993 | retrv-4.5 |