postcommit

This script is called after a commit has completed. Its use has largely been superceded by the use of the postcommand script. The following formatting strings are available in addition to those in the common syntax:

%p

Directory relative to root of last directory committed.

By default the string %r/%p is used, which passes the last directory committed.

If multiple modules or repositories are committed the module in effect when this file is parsed is undetermined, so it is recommended that only the DEFAULT and ALL lines are used.

Keeping a checked out copy

It is often useful to maintain a directory tree which contains files which correspond to the latest version in the repository. For example, other developers might want to refer to the latest sources without having to check them out, or you might be maintaining a web site with cvsnt and want every checkin to cause the files used by the web server to be updated.

The way to do this is by having a line in the CVSROOT/shadow. Here is an example (this should all be on one line):

^cyclic-pages HEAD /u/www/local-docs

This will cause checkins to repository directories starting with cyclic-pages to update the checked out tree in /u/www/local-docs.