4.3. Automatic updates on commit

Start by modifying $CVSROOT/CVSROOT/loginfo

^foundation     (date; cat; ( \
        sleep 1; cd /var/lib/interchange/foundation; cvs -q update -d \
        ) &) >> $CVSROOT/CVSROOT/updatelog 2>&1

The first line tells CVS that for every commit on modules that start with "foundation" (notice the regular expression "^foundation"), it will run cvs update on the given catalog directory in the background. It is important that it is executed in a forked shell (notice the "&") after sleep'ing for 1 second, because otherwise you may run into contention issues that can cause file locking problems. The 1 second timing used above works fine for me, but a longer pause may be necessary for slower computers (you'll know if you get errors about "file locked by user"). See the CVS documentation in the Resources Appendix for more details.