fetch
Retrieves a read-only copy of an element or branch version.
Format
fetch element_name[version_specifier] [-stout | -into pathname[-r]]
[-annotate [-full]]
Description
fetch retrieves a read-only copy of the specified version of an element and
writes it to one of the following:
o A file in your working directory with the same name as the element.
o The file or directory specified by the -into pathname option. Use the
-r option if the target file exists and you wish to overwrite its
contents.
o Standard output (see -stout, below).
If the element you identify in the fetch command is not in the current library
and you have a current system model setting, the DSEE facility searches the
current model for an Element of the given name. If it finds a single Element
block with the same name, the DSEE facility resets your current library setting
to the library containing that Element's primary dependency and then performs
the specified operation.
If the target file already exists, the DSEE facility tells you that fact and
cancels the fetch operation (unless you use the -r option to overwrite the
file).
The -stout option directs the copy to standard output (typically, the display),
instead of to a file.
The fetch command's -annotate option provides you with detailed history about
the evolution of a version of an element. This is useful when you're debugging
source code; you can determine when, in the module's history, specific pieces of
code were added, changed, or deleted, who performed the modification and why.
When you issue fetch with the -annotate option, the read-only copy of the
element that the DSEE facility gives you is interspersed with historical
information about the fetched version. At the top of the file, the DSEE
facility writes the version's history; that is, all the replace events that
preceded the fetched version on the same line of descent.
The annotated copy also contains markers to show you when particular lines of
the version were added or last modified. For example, a group of lines that was
present in the first version of the file will be preceded by the following line:
< For [1] - Inserted: >
When you supplement the -annotate option with -full, the DSEE facility includes
information on lines that aren't in the fetched version but were in the previous
version of the element on the same line of descent. The DSEE facility surrounds
such lines with asterisks to make it clear that they aren't actually in the
fetched version. Here is an example:
< For [41] - Changed/Deleted: >
********************************************************************************
*** strid := strid +1;
********************************************************************************
This notation indicates that the line in the asterisks was deleted or changed in
the fetched version (version 41 of the line of descent).
In an annotated copy, the DSEE facility makes a "best guess" as to whether a
line has been added, changed, or deleted. Sometimes your interpretation of a
modification may not be the same as that of the DSEE facility; for example, you
might think that a line has merely changed, but the DSEE facility says that the
old line has been deleted and a new line added.
Options:
-stdout Writes the specified version to standard output
(typically, the display).
-into pathname [-r] Writes version to "pathname"; optionally
overwrites existing contents of "pathname" (-r).
-annotate [-full] Include historical information in the fetched copy.
The -full option adds information about deleted
lines.