Changing CVS Root from shell

Here’s a simple script that recursively changes CVS/Root files in the project tree

find . -name Root -exec sh -c 'echo :pserver:example@cvs.example.com:2401/var/cvsroot 
> {}' \;

Note sh -c segment of -exec switch, which is necessary in order to successfully redirect to appropriate files.

This could be useful for updating deployed projects with the repository that has moved (for any reason).

Leave a comment

Your email address will not be published. Required fields are marked *