Disabling CVS Access

If a project has moved from CVS to a different version control system we typically leave the previous cvs repository online. Disk space isn't usually a concern. Sometimes the conversion is not complete and it is useful to have the original cvs sources available for comparison, and sometimes for a repeat conversion attempt.

But since the main branch of development has moved elsewhere we don't want people to be confused and to commit to the prior version control repository by mistake. When a project has moved away from cvs it is useful to disable commits to the cvs repository.

This can be done by inserting the following rule into the project's CVSROOT/commitinfo file. It will call the commit_obsolete_notice script which will notify the committer of the current status. The script exits non-zero which will cause cvs to abort the commit.

ALL /usr/local/bin/commit_obsolete_notice %r/%p %s

Note: The %r/%p %s parameters are not used by the script. If they are missing cvs complains that they are missing. (That was a previous default setting that was removed as a cvs default.) Therefore it is easier to ensure that the parameters are there so as to keep cvs silent about them.

Beware of the fact that since Savannah doesn't allow to checkout CVSROOT (see AccessToCVSROOT) this operation may only be done by a Savannah hacker. Moreover editing the file (CVSROOT/commitinfo) directly in the CVS repository seems fine.