October 07, 2003

CVS Repository Management

Creating a Repository

cvs -d repository_directory init

NOTE: repository directory needs to exist before you can turn it into a repository (probably)

The CVSROOT directory inside a repository contains administrative files that control CVS' behavior.

For security reasons it is highly recommended that you set up a cvs group and add any users that will be accessing the repository.

To do this in Mac Os X, open netinfo, go to the groups folder, click on a group and duplicate it. Change the name of the copy, the group id, and set up the users to be included, then save it.

You will then need to setup you repository folders to those permissions.

cd repository_directory
chgrp -R cvs .
chmod ug+rwx . CVSROOT

when adding a new project or files or folders you should probably chgrp -R cvs folder them.

Tip o ' Tod [ BSD systems (including Mac OS X) automatically assign the parent directory's group to sub directories and files inside them. This means we don't need my comment above. For Linux systems we can avoid the chgrp step above by doing this in advance:
chmod g+s path/to/repository]

If you are planning to run a publicly accessible repository, you should set up a Password-Authenticating Server. Since I am not doing that now, I have skipped this section.

understanding RCS Files

in repositories all files show up as filename,r

This file shows the whole text of the most recent update, and then diffs for each revision before that. When you revert to an old version say from 1.7 to 1.5, CVS applies the patch for 1.6 to 1.7 and then the patch for 1.5 to what is now the same as 1.6 was.

Repository structure

Don't use directories named Attic in CVS projects because when files are removed from the project, they will be moved there, and their revision history will be updated to say that the status is “dead.”

Bedtime for now, and I don’t feel I covered that much ground. Next Episode: The CVSROOT Administrative directory - stay tuned

Posted by ultrabob at October 7, 2003 12:52 AM
Comments
Post a comment









Remember personal info?