next up previous
Next: Checking Out Source Code Up: Simple Project Management Using Previous: Defining the Environment Variable

Importing Files Into the Repository

If you already have the project started, you can import the files into the repository by the following steps:

cd SRCDIR
cvs import -m ``LOG MESSAGE HERE'' DESTDIR VTAG RTAG

where:

For example:

cd homework/cpsc320/234_tree
cvs import -m ``Adding 2-3-4 tree to repository'' 234_tree mbland cpsc320

Now, if you were to look into your $CVSROOT directory, you would find the following:

mbland@defender
/home/student/mbland -> ls -F $CVSROOT
234_tree/  CVSROOT/

The CVS manual describes a procedure by which you may doublecheck that the import operation was successful, and if it was, eliminate the original source code directory in favor of the new ``working directory'' (after archiving backups of the originals, of course):

cd ..
mv 234_tree 234_tree.orig
cvs checkout 234_tree
diff -r 234_tree.orig 234_tree

The only difference which diff should report is3:

Only in 234_tree: CVS

which reflects the fact that CVS creates in your working directory an additional directory called ``CVS'' in which it stores administrative data.

If you have not yet started the project (what's your excuse, slacker?), you may still define a directory structure and import that structure into the repository. For example:

mkdir -p homework/cpsc310/tannenbaum
cd homework/cpsc310/tannenbaum
cvs import -m "Importing Tannenbaum directory" cpsc310/tannenbaum mbland cpsc310

Now you may create files within this directory structure and add them to the repository using the ``cvs add'' function, which we will cover later in this document.



next up previous
Next: Checking Out Source Code Up: Simple Project Management Using Previous: Defining the Environment Variable
Michael S. Bland
2000-11-22