The incl command includes the specified element (either a directory or a file) in a particular workspace or stream. If you don’t use the
-s option to name a stream,
incl operates on the workspace containing the current working directory.
You may need to use a complete depot-relative pathname — starting with
/./ (UNIX/Linux) or
\.\ (Windows) — to specify the element to be included. A path must exist in the workspace or stream from the depot’s root directory to the element you wish to include. That is, all the directories between the root directory and your element must be included in the workspace or stream. One or more
incldo commands might be needed to satisfy this requirement.
Note: As of Version 4.6, an
incl command automatically causes AccuRev to execute
incldo commands, as necessary, to include intermediate directory levels in the workspace or stream.
When you include elements in a higher-level stream, the inclusion instantly applies to streams below it in the depot’s stream hierarchy. The inclusion also applies to workspaces below the stream, but the elements don’t appear in a workspace until you update it. This inheritance of inclusions down the stream hierarchy stops at snapshots and at dynamic streams whose basis time precedes the time of the inclusion. The element inclusions don’t apply to the snapshot (which is, by definition, immutable) or to that time-based stream.
Using mkws with the
-i option (to create an initially empty workspace) is a useful technique for organizations that use
incl and
excl to control which elements appear in a workspace.
The -b option enables you to change the backing stream for individual elements. The element is included in your workspace (or in the dynamic stream you specify with
-s); when a new version of the element arrives — through an
update for a workspace, or through automatic inheritance for a dynamic stream — the version comes from the
-b stream (or snapshot), not from the original backing stream.
The incl command is said to create a
cross-link from your workspace (or the
-s stream) to the
-b stream. The
files and
stat commands list a cross-linked element as having
(xlinked) status. When you cross-link a directory element, the entire subtree of elements below it also become cross-linked.
As of AccuRev 4.5: in a stream, you cannot promote cross-linked elements; in a workspace, you cannot
keep (or
anchor, or
defunct, etc.) cross-linked elements.
Notes: for cross-linking to succeed, the element must have been present in the stream specified with
-b at the time your workspace was last updated. In a time-based stream, you cannot create a cross-link to another time-based stream (or to a snapshot) whose basis time is “in the future” with respect to your stream.
Include the python subdirectory of the previously excluded
tools directory in the current workspace:
Include the src\mmgt subdirectory in the current workspace, getting its versions from the snapshot
widget_V3.4: