![]() |
![]() |
||||||
|
|
||||||
|
Reporting with Scripting Information about files or sets of files can be found using bk prs, a command used to extract revision history and or metadata from a file or set of files. There are many options to prs, making it a powerful query language for the BitKeeper database which is your source base. The default behavior is to print a summary of each revision to each of the specified files. There are options to restrict the set if revisions to print, a very commonly used one is -r+ which restricts the set
to the most recent revision.
With no options specified, prs output defaults to giving
information on all revisions of all files under BitKeeper control
in the present directory.
The filename and range of revisions is listed first, offset by
Output Format
To specify a TAB character in the output, use \t; to specify a NEWLINE in the output, use \n; An example dspec which prints the file name (s.file) and the revision number is
In almost all cases, a trailing newline is not provided by any of the variables and one should be provided as needed. The list of variables which currently provide one are: COMMENTS, PATH, DEFAULT, SYMBOLS. If a multi-line variable is printed as one line, i.e., without $each() (see below) providing a prefix and/or a suffix, then the lines are separated by spaces. The list of variables with this behavior is: C, GB, FD.
Conditional Output
|