AccuRev® Command-Line Reference : files

files
show the status of elements
Usage
accurev files [ -s <stream> ] [ -O | -O2 ] [ -fx ] [ -X ]
{ <element-list> | -l <list-file> }
Description
The files command lists the AccuRev status of files and directories in a workspace or reference tree.
As this example shows ...
\.\src\brass.c capon\1 (5\1) (backed)
... the listing for each element includes:
the element’s depot-relative pathname
The various status flags — (backed), (kept), etc. — are the same as those displayed by the stat command.
Optimized Search for Modified Files
By default, files uses a timestamp optimization to speed its search for files that have been modified in your workspace: it doesn’t consider files whose timestamps precede the workspace’s scan threshold (the time that the workspace was most recently updated or otherwise searched for modified files).
It is possible for your workspace to get new files with old timestamps: certain file-copy and file-archive utilities can preserve timestamps; the AccuRev commands co, pop, purge, revert, and update preserve timestamps when copying versions into the workspace if the environment variable ACCUREV_USE_MOD_TIME is set. In such situations, the timestamp optimization causes files to silently ignore relevant files. Use the -O option to have files dispense with the optimization and consider all files, regardless of timestamp, in its search for modified files.
Note: AccuRev 5.4 introduced a second, optional timestamp optimization methodology to work around the above issues. See the “Local, Client-Based Timestamp Optimization” section of the AccuRev On-Line Help Guide for details.
Improving ‘files’ Performance
The timestamp optimization described above produces the greatest performance boost when it enables files to ignore a large number of files based on their timestamps. If files seems sluggish, try executing an update command or a stat -n command. If the workspace contains a significant number of files whose timestamps fall between the previous update and the current time, the optimization will enable a subsequent execution of files to ignore these files. For more on this topic, see The Update Algorithm on page 24 of AccuRev Technical Notes.
Listing of Defuncted / Deleted Objects
If you remove a file or directory element from your workspace with the defunct command, the files command continues to “see” it:
\.\src\brass.c capon_dvt_john\2 (5\2) (defunct) (kept) (member)
That’s because the element itself is still active in your workspace stream. (You can think of it as actively being changed from present to absent.) The element continues to be listed by files, with the (defunct) status flag, until you promote it or purge it. Promoting the defunct element removes it from the workspace stream, and thus from files listings; purging the element effectively undoes the defunct command, returning the element to (backed) status.
Similarly, if you remove a file or directory element from your workspace tree with an operating system command (such as del or rm), the files command continues to “see” it. That’s because the operating system command doesn’t modify the AccuRev element itself. The status of a deleted element in your workspace is (missing).
Note: the stat and files commands do not include defuncted elements when listing the contents of the parent directory. The operating system’s “list directory” command doesn’t see the defuncted element, because defunct removes the file or directory from the workspace tree.
Options
-s <stream>
Display the status of the element(s) in the specified stream, not in your workspace. See the description of <element-list> below.
-O
Override: don’t optimize the search for modified files (that is, don’t ignore files whose modification times precede the workspace’s scan threshold). The override also enables files to report certain elements as “missing” from the workspace. Having to check all files, regardless of modification time, slows files performance. See Optimized Search for Modified Files above.
-O2
Use the local, client-based timestamp optimization methodology introduced in AccuRev 5.4.
-fx
Display the results in XML format.
-X
Add excluded elements to the listing.
–l <list-file>
Process the elements listed in <list-file>. This must be a text file, with one element name per line. Extra whitespace is not allowed; make sure there are no empty lines and no leading or trailing white space around the filenames. Wildcards are not expanded. There is no provision for comment lines in the file.
If you use this option, any <element-list> specified is silently ignored.
<element-list>
One or more element names, separated by whitespace. If you also specify a <list-file> using the –l option, this <element-list> is silently ignored.
You can specify patterns, using the wildcard characters ? (match any character) and * (match any 0 or more characters).
If you use -s to display the status of elements in a non-workspace stream, then each relative pathname in <element-list> is interpreted relative to the depot’s top-level directory. Typically, a simple filename like base.h won’t be valid; instead, use a pathname like src/include/base.h. Alternatively, use a full depot-relative pathname, like /./src/include/base.h.
Examples
List the status of all files in the current directory:
> accurev files

\.\tools\perl\findtags.pl brass2\1 (2\1) (modified)
\.\tools\perl\reporter.pl brass2_john\2 (2\2) (kept) (member)
\.\tools\perl\mail.1 (external)
\.\tools\perl\mail.2 (external)
List the status of all files in subdirectory doc:
> accurev files doc

.\doc\chap01.doc brass2_dvt\1 (2\2) (backed)
.\doc\chap02.doc brass2_john\2 (2\2) (kept) (member)
.\doc\chap03.doc brass2\1 (2\1) (backed)
.\doc\chap04.doc brass2\1 (2\1) (backed)
See Also
stat
Techniques for Selecting Elements on page 13
The Update Algorithm on page 24 of AccuRev Technical Notes
 

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