[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

C.3.8 Taginfo

The `taginfo' file defines programs to execute when someone executes a tag or rtag command. The `taginfo' file has the standard form for script hooks (see section The Trigger Scripts), where each line is a regular expression followed by a command to execute. It supports the ALL and DEFAULT keywords.

In addition to the common format strings (see section The common syntax), `taginfo' supports:

%b

tag type (T for branch, N for not-branch, or ? for unknown, as during delete operations)

%o

operation (add for tag, mov for tag -F, or del for tag -d)

%t

new tag name

%{sTVv}

file attributes, where:

%s

file name

%T

tag name of destination, or the empty string when there is no associated tag name (this usually means the trunk)

%V

old version number (for a move or delete operation)

%v

new version number (for an add or move operation)

For example, some valid format strings are `%%', `%p', `%t', `%s', `%{s}', and `%{sVv}'.

Currently, if no format strings are specified, a default string of ` %t %o %p %{sv}' will be appended to the command line template before replacement is performed, but this feature is deprecated. It is simply in place so that legacy repositories will remain compatible with the new CVS application. For information on updating, see section Updating legacy repositories to stop using deprecated command line template formats.

A non-zero exit of the filter program will cause the tag to be aborted.

Here is an example of using `taginfo' to log tag and rtag commands. In the `taginfo' file put:

 
ALL /usr/local/cvsroot/CVSROOT/loggit %t %b %o %p %{sVv}

Where `/usr/local/cvsroot/CVSROOT/loggit' contains the following script:

 
#!/bin/sh
echo "$@" >>/home/kingdon/cvsroot/CVSROOT/taglog

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on September, 14 2007 using texi2html 1.76.