Setting up CVS (for administrators)

CVS is a version control system. You can use it to keep a record of changes to your source files and to share files between multiple people working on a software project. This document is intended to provide a quick overview of how to setup CVS. These instructions are intended for the configuration manager or cvs administrator, not for CVS users. In general, you should only need to carry out this procedure once.
  1. Create a directory where you want the repository to reside - You'll probably want the repository to reside in your home directory of your unix account. Decide on a name for the directory, such as cvsroot. All we need to do is just create the directory.
  2.         %mkdir cvsroot
  3. Initialize the repository - Tell CVS you want to initialize the repository, which is done using the cvs "init" command.  Assume your unix account is on Waldorf  and your username is "team-alpha"
  4.         %cvs -d /users/cscstd/qrst/team-alpha/cvsroot init
    This initializes the repository and creates the appropriate administrative files needed by cvs. You must provide the full absolute pathname of the desired directory.
     
  5. Put your project source into CVS - For this example, assume there are two files named AppMain.java and AppGUI.java in a directory src/current and we want to "import" them into the CVS repository. Assume we've decided to call our project "myproject."
  6.         %cd src/current
            %cvs -d /users/cscstd/qrst/team-alpha/cvsroot  
                import -m "Creating project from imported source" 
                myproject Team3 start
    (The three lines above are to be entered as one command.)
     

    In this example, "myproject" is the name you desire for CVS to use to identify your project. "Team3" and "start" are the "vendor tag" and "release tag". These can be anything you want them to be and you won't refer to them exept in unusual circumstances. The string after the -m parameter will be entered into the CVS log for this transaction.
    You probably should delete the original source files in src/current after importing them because now CVS is controlling everything.
     

  7. Check file permissions - You must make sure that the other users have read/write/execute access to the repository directory. If everyone on the team belongs to the same UNIX group then you everything should be fine. Just be sure that the group owns the directory that contains the repository. In other situations, you may have to set file permissions. Refer to the CVS manual for more information.
  8.  

    That's it! The repository is now ready for access by your team.