accurev files [ -s <stream> ] [ -O | -O2 ] [ -fx ] [ -X ]
{
<element-list> | -l
<list-file> }
The files command lists the AccuRev status of files and directories in a workspace or reference tree.
The various status flags — (backed),
(kept), etc. — are the same as those displayed by the
stat command.
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.
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.
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.
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.
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.
> 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)
> 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)