bk files(7.3ce) BitKeeper User's Manual bk files(7.3ce) NAME bk files - demo program to show file name expansion SYNOPSIS bk files [<file> ... | -] DESCRIPTION Most BitKeeper commands are designed to operate on a set of files. This command demonstrates how to specify the set of files. File names can be implied, be specified as arguments, be implied with a directory name argument, or be specified as a list on stdin. Implied (nothing specified) If no files are specified, the default list is every ver- sion controlled file in the current working directory. Listed If the command invocation includes a list of files at the end then those files and only those files are operated upon by the command. If any of the specified files are a direc- tory then the list is expanded to include all revision con- trolled files associated with the specified directory. All files A common thing to want to do is to run a command against all files under revision control. There is an easy way to do this: bk -A <command> All user files The previous form will list all files, including deleted files and metadata files. A more useful form is one that only lists files that are user files and are not deleted: bk -U get STDIN If the command invocation has as its last argument a "-" then the command reads the standard input stream for a list of files, one per line, on which to operate. If the list is in the form file.c|1.5 header.h|1.8 manpage|1.8..1.20 then the receiving command will operate on the supplied revision[s]. WILDCARDS It is possible to restrict the command to a specified set of files using what are called wild cards (or globs in Unix terminology). If a name specified includes a glob pattern then only files matching that pattern are processed. Only the basename of the file is compared against the glob, not the full path name. The patterns are standard Unix glob nience: a "=" may be used in place of a "*" to match any pattern. In order for the "=" alias to work, an environ- ment variable BK_GLOB_EQUAL must be set to the value YES. To match all header files both of the following do the same thing: export BK_GLOB_EQUAL=YES bk diff =.h bk diff '*.h' If you have a file with an "=" or other glob characters in its name you will need to either quote those characters with a proceeding backslash (i.e., "\*.h" matches a file named "*.h"), or if the file name specified contains a "/" then no glob expansion is applied. This makes it possible to do things like bk diff './*.h' and have that match the file named "*.h". EXCEPTIONS Certain commands do not autoexpand directories because the commands are destructive. An example is bk unedit, this command throws away any changes made to files and it refuses to autoexpand to all files, the files must be specified. EXAMPLES See changes in the current directory: bk diff See all changes in the repository: bk -U diff See all changes to header files in the repository: bk -U diff '*.h' List all C or header files containing the phrase "proc" in their name: bk -A files '*proc*.[ch]' See all modified user files: bk -cU See all extra files: bk -xA EXIT STATUS bk files returns exit status 0. SEE ALSO bk bk bk diff bk glob bk gfiles CATEGORY File Repository BitKeeper Inc 1E1 bk files(7.3ce)