The commitinfo file defines programs to execute whenever cvs commit is about to execute. These programs are used for pre-commit checking to verify that the modified, added and removed files are really ready to be committed. This could be used, for instance, to verify that the changed files conform to to your site's standards for coding practice.

As mentioned earlier, each line in the commitinfo file consists of a regular expression and a command-line template. A number of extra options are available in the commitinfo file beyond those in the generic list.


File name(s) that this invocation is using.


Commit message supplied by the user


Current directory name, relative to the root.

The default pattern used if none is specified is %r/%p %<s, which causes the full path to the current source repository to be appended to the template, followed by the file names of any files involved in the commit (added, removed, and modified files).

The first line with a regular expression matching the directory within the repository will be used. If the command returns a non-zero exit status the commit will be aborted.

If the repository name does not match any of the regular expressions in this file, the DEFAULT line is used, if it is specified.

All occurrences of the name ALL appearing as a regular expression are used in addition to the first matching regular expression or the name DEFAULT.

Note: when cvsnt is accessing a remote repository, commitinfo will be run on the remote (i.e., server) side, not the client side (the section called “Remote repositories”).