Pathname Optimization:
Selective Processing of External Objects

Eligible Searches

Values for ACCUREV_IGNORE_ELEMS

Specifying Directories and Their Contents

Notes on Setting the Value

*************** Note ***************

(This topic applies to a File Browser displaying the contents
of a workspace A location in which one or more users perform their work, using files under version control. Each workspace consists of a workspace stream in the repository and a workspace tree in the user's disk storage. -- not a dynamic stream A stream whose configuration changes over time, with new versions promoted from child workspaces and/or from other dynamic streams. It also inherits versions from its parent stream. or snapshot An immutable (frozen, static) stream that captures the configuration of another stream at a particular time. A snapshot cannot be renamed or modified in any way..)


*************** Note ***************

The File Browser's search facility is very powerful and useful, but searching through an entire workspace or stream can be time-consuming. For example, if your workspace tree The ordinary directory tree, located in the user's disk storage, in which the user performs development tasks and executes AccuRev commands. contains many hundreds or thousands of files, you must wait while all the names are transmitted to the server machine, the AccuRev Server process determines the status of each file, and information on the matching files is returned to the client machine.

This large list of files to be processed may contain a significant number of "don't care" files. For example, a search for external A file or directory that is located within a workspace tree but has not been placed under version control has 'external' status. files is probably intended to locate source files (with suffixes like .c or .cc or .java or .bas ) that you've forgotten to place under version control. You probably don't care about files with suffixes like .exe (executables built in the source directory), .bak (editor backup files), .msg (copies of mail messages, and so on -- because you don't intend to place them under version control.

You can use the environment variable ACCUREV_IGNORE_ELEMS to specify one or more patterns -- or even individual filenames/pathnames. When it executes certain searches, the File Browser ignores all external files that match this specification. For example, setting ACCUREV_IGNORE_ELEMS to the following value causes all .exe and .bak files to be ignored:

*.exe *.bak

Notes (click to view):

Eligible Searches

The following File Browser searches use the value of ACCUREV_IGNORE_ELEMS to filter the names of external objects:

External
Modified
Non-member
Pending

The File Browser's Update command can use the value of ACCUREV_IGNORE_ELEMS to filter the names of both external objects and elements [WARNING! Make sure that the ACCUREV_IGNORE_ELEMS value matches pathnames of external objects only. If the pathname of a file element is matched during an Update, and that element has (modified) status, AccuRev will proceed with the Update, invoking the routine that overwrites the file with the backing-stream version. This routine will get an error when performing a CRC check on the file.]. It does so only if the user preference Use Ignore Element Optimization is set.

Values for ACCUREV_IGNORE_ELEMS

The value of the ACCUREV_IGNORE_ELEMS environment variable must be a SPACE-separated list of filenames, pathnames, and wildcard patterns. You can use either or both of the "standard" wildcards:

Be careful -- the asterisk (*) wildcard works a bit differently here than in standard UNIX and Windows command processors. It matches any number of characters, including the directory separator (/ or \). With standard UNIX and Windows command processors, the scope of * is restricted to a single pathname component.

Examples (click to view):

*.exe

Matches files whose names end with ".exe", located in any directory.

*.exe *.doc
manuals/*.doc

Matches files whose names end with ".doc", located in top-level directory "manuals".

Matches files whose names end with ".exe" or ".doc", located in any directory.

*/manuals/*.doc
*.doc README.html

Matches files whose names end with ".doc", located in any directory. Also matches a file named "README.html" in the top-level directory.

Matches files whose names end with ".doc", located in any directory named "manuals".

Test yourself ... given this set of files:

(1) manuals/chap01.doc
(2) manuals/usergd/chap01.doc
(3) widgetproj/src/manuals/usergd/chap01.doc

... what do these patterns match? (click to view):

manuals/*.doc Matches (1) and (2), but not (3).

*/manuals/*.doc Matches (3), but not (1) or (2).

*manuals/*.doc Matches all three pathnames.

Specifying Directories and Their Contents

A typical application of ACCUREV_IGNORE_ELEMS is to have the External search ignore temporary build directories. That is, you want the listing to exclude both the directories themselves and all the files within those directories. If the build directories are named build_001 , build_002 , etc., you might be tempted to use this pattern:

*/build_???/*

But this pattern matches only the contents of the directories, not the directories themselves. Instead, use the following value for ACCUREV_IGNORE_ELEMS:

*/build_??? */build_???/*

Don't use the single pattern */build_???* . It would match both directories and their contents. But it also might coincidentally match names of some source files, such as lib/build_end.c.

Notes on Setting the Value

As with any environment variable, the value of ACCUREV_IGNORE_ELEMS must be set in the environment before the AccuRev GUI process is started. Here are some guidelines: