Version Control on Mac OS X, Part 2
Subject:   what about binary files
Date:   2003-08-13 05:59:52
From:   kom_14
Response to: what about binary files

To set up CVS for local access, do the following:

1. Open the Terminal application (located in /Applications/Utilities) and create a local directory to hold the CVS repository for your project.

2. Set the CVS environment variable CVSROOT to the location of the local repository (the directory you just created). Doing so enables CVS commands to locate files under version control. The following command sets the CVSROOT environment variable to the correct location (for the tcsh shell).

% setenv CVSROOT /Users/omalley/cvs-repository

3. From the Terminal, run the CVS initialization command to create the CVS administrative files in the repository:

% cvs -d /Users/omalley/cvs-repository init

You only need to run the cvs init command once, before anyone on the system uses the new repository.

For convenience, add the environment variable to your startup file. Doing so prevents you from entering it each time you open a shell. For tcsh shell, add them to your .cshrc file.

I do not set CVSROOT in .cshrc. Instead, I have a file called .alias that is source by my .cshrc. This files contains all my aliases, including setting the repository location for different projects:

alias cvs-proj1 'setenv CVSROOT /Users/omalley/proj1'
alias cvs-proj2 'setenv CVSROOT /Users/omalley/proj2'

This approach enables me to manually switch between multiple project repositories, something I do at work all the time.

Hope this helps.