3. Specifying Ignore Patterns for External Objects : Where You Can Specify Ignore Patterns

Where You Can Specify Ignore Patterns
You can specify ignore patterns in AccuRev using:
One or more .acignore files
The --ignore option for the add, files, and stat CLI commands
All of these methods accept the ignore patterns described in Wildcards in Ignore Patterns. This section describes differences in their use, and the precedence when ignore patterns have been specified in multiple places.
Global versus per-Directory Use of Ignore Patterns
A globally specified ignore pattern is one that affects more than a single directory -- all of a user’s workspaces, or all of the directories within a workspace, for example. An ignore pattern specified in a directory affects only that directory. The following table summarizes the effect of the ignore patterns you can specify in AccuRev.
Examples
A simple wild card pattern such as “*.doc” that is specified globally matches any of these names:
docs/chap01.doc
docs/manuals/chap01.doc
docs/widgetproj/src/manuals/usergd/chap01.doc
The pattern manuals/*.doc specified in docs/.acignore matches any of these names:
docs/manuals/chap01.doc
docs/manuals/chap02.doc
... but not these names:
docs/manuals/usergd/src/chap01.doc
docs/widgetproj/src/manuals/usergd/chap01.doc
However, using ** to specify recursion as in manuals/**/*.doc or manuals/**/*chap*.doc will match any occurrence of *.doc or *chap*.doc in any directory underneath the docs/manuals directory. See Wildcards in Ignore Patterns for more information on using **.
Ignore Pattern Precedence
As mentioned previously, you can specify ignore patterns using one or more .acignore files and the --ignore option for the add, files, and stat CLI commands. If more than one ignore pattern matches a given file or directory, AccuRev enforces those patterns in the following order:
1.
--ignore command line option takes precedence over any other ignore patterns
2.
.acignore in any workspace directory
3.
.acignore in %WS_ROOT%/.accurev
4.
.acignore in %USERPROFILE%/.accurev
In addition, note that:
If multiple pattern matches are found in the same .acignore file or set of --ignore options, the last match takes precedence over other matches in the same file or command line option.
Specifying an Exception to an Ignore Pattern
You can use the exclamation mark ( ! ) to specify an exception to an ignore pattern. For example, imagine you have specified a global ignore pattern, *.exe, so that AccuRev ignores all external objects in your workspace with a .exe extension. If you wanted, you could specify !*.exe locally in an individual workspace directory, in which case AccuRev would ignore all external objects ending with .exe except those in the directory you specified. Similarly, specifying !generate.exe
(stat -x --ignore=!generate.exe, for example) would include the generate.exe file in the list returned by the stat command.
The (ignored) Status
When you specify an ignore pattern, any external objects matching that pattern are given an (ignored) status (in addition to the (external) status they have because they are external objects). Ignored objects are not displayed when navigating using the Workspace Explorer -- because you have explicitly told AccuRev to ignore them.
You can display ignored objects in the File Browser (as shown in the following illustration) by choosing the Include Ignored Objects preference on the General tab of the AccuRev Preferences dialog box.
(Ignored objects are never displayed in the File Browser when using the External search filter, regardless of how the Include Ignored Objects preference is set.)
See Controlling the Display of External Objects of the AccuRev On-Line Help Guide for more information.

Micro Focus