The loginfo file is used to control where cvs commit log information is sent. The first entry on a line is a regular expression which is tested against the directory that the change is being made to, relative to the $CVSROOT. If a match is found, then the remainder of the line is a filter program that should expect log information on its standard input.

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 DEFAULT.

The first matching regular expression is used.

the section called “The commit support files”, for a description of the syntax of the loginfo file.

The user may specify a format string as part of the filter. The string is composed of a % followed by a space, or followed by a single format character, or followed by a set of format characters surrounded by { and } as separators. The format characters are those in the common syntax plus:


Message supplied by user


Status string


Directory name relative to the current root


Module name, followed by the list of filenames. When used in a group this option has a special action which is designed to mimic previous versions of cvs when the standard %{sVv} is used.


Current version, pre-checkin.


Current version, post-checkin.


Bug identifier





All other characters that appear in a format string expand to an empty field (commas separating fields are still provided).

For example, some valid format strings are %, %s, %{s}, and %{sVv}.

By default the standard input is a formatted string which mimics the behaviour of older CVS versions (see below).

For a commit the command line will be a string of tokens separated by spaces. For backwards compatibility, the first token will be the repository subdirectory. The rest of the tokens will be comma-delimited lists of the information requested in the format string. For example, if /u/src/master/yoyodyne/tc is the repository, %{sVv} is the format string, and three files (ChangeLog, Makefile, foo.c) were modified, the output might be:

yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13

As another example, %{} means that only the name of the repository will be generated.

When run as part of an import or add directory, the command line the repository subdirectory followed by the text

- New Directory


- Imported Sources

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

Loginfo example

The following loginfo file, together with the tiny shell-script below, appends all log messages to the file $REAL_CVSROOT/CVSROOT/commitlog, and any commits to the administrative files (inside the CVSROOT directory) are also logged in /usr/adm/cvsroot-log. Commits to the prog1 directory are mailed to ceder.

ALL             /usr/local/bin/cvs-log $REAL_CVSROOT/CVSROOT/commitlog $USER
^CVSROOT        /usr/local/bin/cvs-log /usr/adm/cvsroot-log
^prog1          Mail -s %s ceder

The shell-script /usr/local/bin/cvs-log looks like this:

(echo "------------------------------------------------------";
 echo -n $2"  ";
 cat) >> $1

Loginfo default standard input format

For both commit and import the first two lines are the following:

Update of %r/%p
In directory %H:%P

Next part is different for import and commit. For commits there comes line with the current operation/operations, namely "Added Files:", "Removed Files:" or "Modified Files:". In the next lines there are, indented with TAB, space separated list of added, removed or modified files. There is no such section for added directories (because one can remove empty directories only with checkout/update with -P option, not by commit). There is instead "Directory $CVSROOT/subdirectory added to repository" log message. For import next part (separated by empty line) is the log message:

Log Message:

This part is also after commit, but for commit it is at the very end of input, and is _not_ separated by an empty line. Further parts are for import solely. After log message, separated by empty line comes:


Next is the information about release and vendor tag (see 'cvs import' syntax), separated of course from log message by an empty line, namely

Vendor Tag: vendor_tag
Release Tags: release_tag

Next, separated by an empty line, is the output of the import command. The format is

X module_dir/subdir/file

where X is one letter indicator of status. The last line is the status of import command, e.g.

No conflicts created by this import