The following instructions describe how to create a CVS source code repository in the student.cs computing environment.
These instructions assume that you have already followed Step 1 (setting up your environment) and Step 2 (obtaining OS/161 source code) from the OS/161 Installation Guide, and that you have not yet followed Step 3 (Configure and Build). This is because we want to create a CVS repository that contains the OS/161 source code, but not all of the other junk that gets created when you configure and build.
First, create a directory to hold the repository:
mkdir ~/cvsroot
and set your CVSROOT environment variable to indicate
where your repository will be located. Users of csh
or tcsh should do
setenv CVSROOT ~/cvsroot/cs350
while users of bash should do
CVSROOT=~/cvsroot/cs350
export CVSROOT
You should make these settings take effect every time you
log in by including the above commands in your .cshrc
file (for csh or tcsh users) or your
.bashrc file (for bash) users.
By setting CVSROOT, you can avoid having to pass the -d parameter to many cvs commands.
Now, initialize your repository:
Now, import the source code (which you have already copied
into your account) into your repository:
cd ~/cs350-os161/os161-1.99
cvs import -m "Import of os161" os161-1.99 os161 os161-1_99
You can alter the arguments as you like; here's a quick explanation:
-m "Import of os161" is the log message that CVS records. (If you don't specify it on the command line, it will start up a text editor). os161-1.99 is the CVS project name. It will also be the name that you specify when you check out your source code. os161 is the "branch tag." You needn't worry about the full implications of this; think of it as giving CVS a name to help you remember from where you got this code. os161-1_99 is the name of the version of the code that you are importing. (Always use the actual version, whatever it is. Replace dots with underscores.) You can use this name later with cvs diff and other CVS commands.
Now that you've checked the OS/161 source code into the CVS repository,
you can get rid of the original source code copy that you checked in.
Your code's permanent home is now in the repository.
cd ..
rm -rf os161-1.99
Finally, replace the code that you just deleted with a working
copy of the code. To get a working copy, you check it out of
the repository:
cvs checkout os161-1.99
Now, the directory ~/cs350-os161/os161-1.99 should exist,
and it should contain your working copy of the OS/161 source code.
The working copy should look just like the original source code
that you checked in, except that you should notice an extra
CVS directory in every directory of your source tree.
These directories are where CVS keeps some of the meta-data that
it used to link your working copy back to the master copy in
the repository.
At this point, your repository is set up and you have a working copy checked out and ready to go. If you are not too familiar with CVS, you should read the document Using CVS for an overview. Comprehensive documentation is available at http://ximbiot.com/cvs/manual/.
When you are ready, you can proceed to Step 3 (Configure and Build OS/161) in the OS/161 Installation Guide using your checked out working copy of the OS/161 source code.