3. The File Browser : Pathname Optimization:Selective Processing of External Objects

Pathname Optimization:
Selective Processing of External Objects
Note: This topic applies to a File Browser displaying the contents
of a workspace -- not a dynamic stream or snapshot.
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 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 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
Note: Controlling the display of external objects
If you intend to use ACCUREV_IGNORE_ELEMS to have AccuRev ignore some external objects, you'll probably want to set the preference that enables the display of external objects in the File Browser. But this is not required; you can use ACCUREV_IGNORE_ELEMS to improve performance, but still suppress external objects from the File Browser display to save visual clutter.
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 It does so only if the user preference Use Ignore Element Optimization is set.
CAUTION: 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.
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:
? matches any one character
* matches any sequence of characters (including a zero-length sequence)
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:
*.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".
For example, assume the following set of manuals:
(1) manuals/chap01.doc
(2) manuals/usergd/chap01.doc
(3) widgetproj/src/manuals/usergd/chap01.doc
Here is how various wildcards will work:
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:
Setting the value on a UNIX/Linux system
When setting the ACCUREV_IGNORE_ELEMS environment variable on a UNIX or Linux system, be sure to single-quote or double-quote the value, in order to protect any wildcard characters from being expanded by the shell:
export ACCUREV_IGNORE_ELEMS="*.exe *.doc" (Bourne shell family)
setenv ACCUREV_IGNORE_ELEMS "*.exe *.doc" (C shell family)
To determine the current value of ACCUREV_IGNORE_ELEMS, use either of these commands:
env | grep ACCUREV_IGNORE_ELEMS (or a shorter `grep' pattern)
echo "$ACCUREV_IGNORE_ELEMS" (don't forget the quotes!)
Setting the value on a Windows system
On a Windows system, you can set the ACCUREV_IGNORE_ELEMS environment variable in the System applet (on the Control Panel). Alternatively, use the set command in a Command Prompt window:
set ACCUREV_IGNORE_ELEMS=*.exe *.doc (no quotes!)
Don't use quote characters, even if the value includes SPACEs.
To determine the current value of ACCUREV_IGNORE_ELEMS in a Command Prompt window, use either of these commands:
set
echo %ACCUREV_IGNORE_ELEMS%

AccuRev, Inc.
Phone: 781-861-8700
Fax: 781-861-8704
support@accurev.com