Pathname Optimization:
Selective Processing of External Objects
*************** 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):
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.
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! ]. It does so only if the user preference Use Ignore Element Optimization is set.
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 (click to view):
Matches files whose names end with ".exe", located in any directory.
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):
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.
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%