<div id="loginfo"></div>
<div class="header">
<p>
Previous: [[cvs: Editinfo#Editinfo|editinfo]], Up: [[cvs: The commit support files#The commit support files|commit files]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>

----

<div id="Loginfo"></div>
==== Loginfo ====
<div id="index-loginfo-_0028admin-file_0029"></div>
<div id="index-Storing-log-messages"></div>
<div id="index-Mailing-log-messages"></div>
<div id="index-Distributing-log-messages"></div>
<div id="index-Log-messages"></div>

The &lsquo;<tt>loginfo</tt>&rsquo; file is used to control where
&lsquo;<code>cvs commit</code>&rsquo; 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 <code>$CVSROOT</code>.  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 &lsquo;<code>DEFAULT</code>&rsquo;
line is used, if it is specified.

All occurrences of the name &lsquo;<code>ALL</code>&rsquo; appearing as a
regular expression are used in addition to the first
matching regular expression or &lsquo;<code>DEFAULT</code>&rsquo;.

The first matching regular expression is used.

See [[cvs: The commit support files#The commit support files|commit files]], for a description of the syntax of
the &lsquo;<tt>loginfo</tt>&rsquo; file.

The user may specify a format string as
part of the filter.  The string is composed of a
&lsquo;<code>%</code>&rsquo; followed by a space, or followed by a single
format character, or followed by a set of format
characters surrounded by &lsquo;<code><nowiki>{</nowiki></code>&rsquo; and &lsquo;<code><nowiki>}</nowiki></code>&rsquo; as
separators.  The format characters are:

;<tt>s</tt>
: file name
;<tt>V</tt>
: old version number (pre-checkin)
;<tt>v</tt>
: new version number (post-checkin)

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 &lsquo;<code>%</code>&rsquo;,
&lsquo;<code>%s</code>&rsquo;, &lsquo;<code>%<nowiki>{</nowiki>s<nowiki>}</nowiki></code>&rsquo;, and &lsquo;<code>%<nowiki>{</nowiki>sVv<nowiki>}</nowiki></code>&rsquo;.

The output will be a space separated string of tokens enclosed in
quotation marks (<tt>&quot;</tt>).
Any embedded dollar signs (<tt>$</tt>), backticks (<tt>&lsquo;</tt>),
backslashes (<tt>\</tt>), or quotation marks will be preceded
by a backslash (this allows the shell to correctly parse it
as a single string, regardless of the characters it contains).
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
&lsquo;<code>/u/src/master/yoyodyne/tc</code>&rsquo; is the repository, &lsquo;<code>%<nowiki>{</nowiki>sVv<nowiki>}</nowiki></code>&rsquo;
is the format string, and three files (<tt>ChangeLog</tt>,
<tt>Makefile</tt>, <tt>foo.c</tt>) were modified, the output
might be:

<div class="example" style="margin-left: 3.2em">
 &quot;yoyodyne/tc ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13&quot;
</div>

As another example, &lsquo;<code>%<nowiki>{</nowiki><nowiki>}</nowiki></code>&rsquo; means that only the
name of the repository will be generated.

Note: when <small>CVS</small> is accessing a remote repository,
&lsquo;<tt>loginfo</tt>&rsquo; will be run on the ''remote''
(i.e., server) side, not the client side (see [[cvs: Remote repositories#Remote repositories|Remote repositories]]).

 [[cvs: Loginfo example#Loginfo example|&bull; loginfo example]]::             Loginfo example
 [[cvs: Keeping a checked out copy#Keeping a checked out copy|&bull; Keeping a checked out copy]]::  Updating a tree on every checkin


----

<div class="header">
<p>
Previous: [[cvs: Editinfo#Editinfo|editinfo]], Up: [[cvs: The commit support files#The commit support files|commit files]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
</div>
This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
