From Maslab 2011

Jump to: navigation, search

Note that Subversion is a more powerful alternative to CVS; you should use it instead unless you have a good reason.

Setting up a CVS respository

  • To set up a CVS repository for your team in your Athena locker:
    1. mkdir ~/maslabcvs (you can name it whatever you want)
    2. fs setacl -dir ~/maslabcvs -acl system:maslab-2009-team-N all (where N is your team number; see Athena lists)
    3. setenv CVSROOT $HOME/maslabcvs
    4. cvs init
    5. Change to the directory that contains your code. Make sure it contains only files/directories that you want to put in the repository.
    6. cvs import modulename init head (where modulename is a name you pick)
  • If one of your teammates has set up a repository for your team, do this:
    1. attach teammate (where teammate is the username of the person who made the repository)
    2. setenv CVSROOT /mit/teammate/maslabcvs
    3. If you put the previous two lines in your .environment file, you won't ever need to type them again. You might also want to set CVS_EDITOR to your favorite text editor. It will be used for recording log messages when you commit.

Using CVS

  • To checkout a copy of the code: cvs co modulename.
  • To update your copy to the latest version: cvs up.
  • To commit your changes: cvs commit (you must update before you can commit).
Personal tools