The mkref command creates a
reference tree, a directory tree containing copies of all the versions in a
stream. A reference tree is very similar to a
workspace. You use a reference tree for building, testing, data export, and similar activities; you use a workspace for creation of new versions (source-code development). See
Entity Names for information on naming reference trees.
mkref fills the directory tree with read-only files. You can work with these files using such
accurev commands as
hist and
diff. But you cannot use any AccuRev command that would modify these files:
co,
add,
defunct,
keep,
merge,
move,
promote,
purge, or
undefunct.
If the stream’s contents have changed since you created the reference tree, update overwrites some files with the new versions. (See
Using a Trigger to Maintain a Reference Tree in
AccuRev Technical Notes for information on how to automate the updating of reference trees.)
If you rename an existing reference tree with the chref command, you can then create a new reference tree with the original name.
A stream does not actually contain files — it contains the version-IDs of a set of
elements. (More precisely, a stream’s specifications enable AccuRev to rapidly construct the list of elements and version-IDs.)
mkref builds a directory tree on your disk, containing copies of the files indicated by those version-IDs.
For example, a stream named gizmo_rls2_dvt (stream #32 in its depot) might contain:
Only two elements, gizmo.readme and
relnotes.doc, are under active development in this stream. For all the other elements, this stream uses a version that was promoted to the depot’s base stream (stream #1).
mkref creates a directory tree containing five files:
Specify the line terminator to be used when an AccuRev command (e.g. update,
co) copies a version of a text file from depot storage to the reference tree. (In depot storage, all text files are stored with the AccuRev-standard line terminator,
NL.) The <
eol-type> can be
d (default: use the standard line terminator for the client machine’s operating system),
u (use the UNIX/Linux line terminator,
NL), or
w (use the Windows line terminator,
CR-NL).
Create a reference tree named gizmo_snapl, based on stream
gizmo, at a particular location: