|Version Management with CVS - the CVS manual|
by Per Cederqvist et al.
Paperback (6"x9"), 216 pages, 8 figures
RRP £19.95 ($29.95)
10.6.2 Telling CVS to notify you
You can tell CVS that you want to receive
notifications about various actions taken on a file.
You can do this without using
cvs watch on for
the file, but generally you will want to use
watch on, to remind developers to use the
- Command: cvs watch add [
Add the current user to the list of people to receive notification of work done on files.
-aoption specifies what kinds of events CVS should notify the user about. action is one of the following:
Another user has applied the
cvs editcommand (described below) to a watched file.
- Another user has committed changes to one of the named files.
Another user has abandoned editing a file (other than by committing changes).
They can do this in several ways, by:
cvs uneditcommand (described below) to the file
cvs releasecommand (see section A.16 release--Indicate that a Module is no longer in use) to the file's parent directory (or recursively to a directory more than one level up)
deleting the file and allowing
cvs updateto recreate it
- applying the
- All of the above.
None of the above. (This is useful with
cvs edit, described below.)
-aoption may appear more than once, or not at all. If omitted, the action defaults to
The files and options are processed as for
cvs watch on.
- Command: cvs watch remove [
Remove a notification request established using
cvs watch add; the arguments are the same. If the
-aoption is present, only watches for the specified actions are removed.
When the conditions exist for notification, CVS
calls the ‘notify’ administrative file. Edit
‘notify’ as one edits the other administrative
files (see section 16.7 The administrative files). This
file follows the usual conventions for administrative
files (see section B.3.1 The common syntax), where each line is a regular
expression followed by a command to execute. The
command should contain a single occurrence of ‘%s’
which will be replaced by the user to notify; the rest
of the information regarding the notification will be
supplied to the command on standard input. The
standard thing to put in the
notify file is the
ALL mail %s -s "CVS notification"
This causes users to be notified by electronic mail.
Note that if you set this up in the straightforward way, users receive notifications on the server machine. One could of course write a ‘notify’ script which directed notifications elsewhere, but to make this easy, CVS allows you to associate a notification address for each user. To do so create a file ‘users’ in ‘CVSROOT’ with a line for each user in the format user:value. Then instead of passing the name of the user to be notified to ‘notify’, CVS will pass the value (normally an email address on some other machine).
CVS does not notify you for your own changes. Currently this check is done based on whether the user name of the person taking the action which triggers notification matches the user name of the person getting notification. In fact, in general, the watches features only track one edit by each user. It probably would be more useful if watches tracked each working directory separately, so this behavior might be worth changing.
|ISBN 0954161718||Version Management with CVS - the CVS manual||See the print edition|