The concurrent versions system is a mandatory part of your CS450 project. In order to make it as easy to use as possible, we will present a tutorial on the proper usage of cvs and other related commands...Other information can be found on the man pages (man cvs), or on your own!
CS450 Project Directory
Each CS450 project group will receive access to their own project subdirectory in the cs450 account. The subdirectory is located at ~cs450/##, where ## is your group number. The easiest way to access the directory is to set up a soft link from your home directory to your cs450 project directory:$ ln -s /home/cs450/99 cs450Once you have created a soft link to your project directory, you can treat it as if it were a subdirectory in your account.
$ ls -l
lrwxrwxrwx 1 ross student 2 Jan 25 00:00 cs450 -> /home/cs450/99
$This will create a directory called cs450 in the current directory that is linked to the cs450 subdirectory from group 99.
If your shell is bash, open the .bashrc file and add the following line:
export EDITOR=emacs
If your shell is csh, open the .cshrc file and
add the following line: setenv EDITOR emacs
Setting up CVS for the First Time
Team
Leader (Do this before your partners do anything!):
1) make a directory
in ~cs450 (the softlink you just created) called CVS (mkdir ~cs450/CVS)
2) cd to your home directory.
3) Depending on what type of shell you're
using, do the following:
- For csh/tcsh: setenv CVSROOT ~/cs450/CVS
- For bash/ksh: CVSROOT=~/cs450/CVS
export CVSROOT
4) in your home directory, type cvs init
5)
go to your home directory (or some subdirectory you want to put your compilers
files in, e.g. ~/compilers). Make two directories from here, called
'working' and 'compilers'.
6) cd into working
7) cp
the header file, header.txt, which is found in ~sross/public/ (cp
~sross/public/header.txt . )
8) open the header.txt file which
you copied and change the info on it to pertain to your group(i.e. group
members, group number). Save your changes. (it should be saved into your
working/ directory)
10) type the following:
cvs import -m "First Entry" working vendor release
11) cd into
compilers
12) Type in the following command: cvs checkout
working
YOU SHOULD NEVER HAVE TO CALL CHECKOUT AGAIN!
Other Team Members: To be completed after the Team Leader has
done the above.
1) Depending on what type of shell you're using, do
the following:
- For csh/tcsh: setenv CVSROOT ~/cs450/CVS
- For
bash/ksh: CVSROOT=~/cs450/CVS
export CVSROOT
2) make a directory called compilers from your
home directory
3) cd into the compilers directory.
4) Type in the
following command: cvs checkout working
The header file should be included at the top of every source code file we will receive from you. It will keep a log of messages (including the person who wrote the message) whenever a file is committed into cvs. YOU SHOULD NEVER HAVE TO ENTER THE ~cs450/CVS DIRECTORY AFTER SETUP WITH THE CVS SYSTEM!!! DON'T TOUCH! From this point, if you ever add files to the 'working' directory (which is in the 'compilers' folder), everyone in your group will have to call cvs update in order to get the new file (as well as changes).
Please check tutorials in order to learn how to add files and commit changes. If you're having trouble, make sure the permissions are set correctly (read below).
Because we are working in a group environment, it is necessary to set the group and mode of the file so that other group members will have access to the files. Firstly, the permissions for the file must be set to 660 using the chmod command (660 is read/write permission for the owner and group). Even with the permissions set right, you must also make sure that the file belongs to your project group by using the chgrp command. Below is a typical example of what you must do to set the appropriate permissions and group for our sample file (stub.adb):$ ls -l stub.adbSince the stub.adb file has read/write permissions for both the owner and group and since the file now belongs to the cs45099 group, we are ready to place the initial revision of the file into the CVS database...
-rw------- 1 ross student 1095 Jan 25 00:00 stub.adb
$ chmod 660 stub.adb
$ ls -l stub.adb
-rw-rw---- 1 ross student 1095 Jan 25 00:00 stub.adb
$ chgrp cs45099 stub.adb
$ ls -l stub.adb
-rw-rw---- 1 ross cs45099 1095 Jan 25 00:00 stub.adb
$Submitting Project Milestones
The Team Leader will be the only group member to submit Milestones to the TA. In order to do this, go into your working directory. Create a tar file of all of the relevant files we'll need (i.e. source code, compiled code, makefiles, etc.- ALWAYS include the mp file!). Make sure your project compiles before submitting. Your tar file should be named groupxx.tar, where xx is your group number. In order to create a tar file, you will need to know the following command. If your group number is a single digit (i.e. 1), remember your group number is actually 01.tar -cvf groupxx.tar file1.txt file2.txt file3.txt
(where the files being included in the tar file are file1, file2, and file3).
To make sure that everything was included correctly, you can check the contents of a tar file by typing in the following:tar -tf groupxx.tar
Attach the tar file to an email and send it to cs450@cs.montana.edu.