http://groups.google.com/groups?hl=en&selm=qh8zmtugt8.fsf_-_%40ruckus.brouhaha.com
Newsgroups: alt.sys.pdp10 Date: 2001-02-26 16:12:04 PST
> Help! I tried to create my local repository but have some problems with > 'cvs import' command. [...] > $ cvs import -m "Initial TS10 Developement" ts10 >> > When I attempt to execute 'cvs import ...', I was kept getting > usage information instead! :-(
Don't use cvs import. below is detailed instructions on what to do.
Here's some step-by-step instructions to help you with CVS. It is easiest if you put your source directory into a nested directory (which need not contain anything else). I'm assuming you'll have it in the directory ~/work/ts10 but you can easily substitute anywhere else. I also assume that you are using the bash shell; if you use tcsh you'll have to use setenv instead of export. I've shown the shell prompt as '% '.
Set the CVSROOT environment variable to point to where you want the repository to live:
% export CVSROOT=~/ts10-cvs
For tcsh, the equivalent would be:
% setenv CVSROOT ~/ts10-cvs
(Note the space instead of the equals sign.)
Create the repository directory:
% mkdir $CVSROOT
Tell CVS to initialize the repository:
% cvs init
Create the subdirectory in the repository for your source files:
% mkdir $CVSROOT/ts10 % ls $CVSROOT CVSROOT ts10 %
If your working source tree has subdirectories, create a similar subdirectory structure here. For instance, if you have ts10/foo, ts10/bar, and ts10/bar/baz:
% mkdir $CVSROOT/ts10/foo $CVSROOT/ts10/bar $CVSROOT/ts10/bar/baz
cd to the parent of the source directory:
% cd ~/work
(Note that your ts10 source code is in the ts10 directory *below* this one. If you do an "ls" at this point, it should just show the ts10 subdirectory.)
Do a cvs checkout. This sets up the CVS subdirectories in the source tree:
% cvs checkout ts10
This will produce output with one line for each file in ts10, with a question mark at the left. This indicates that cvs has found those files but they are not yet part of the repository.
cd into the source directory:
% cd ts10
do a cvs add of all files you want to go into the repository, this tells CVS that you are going to check them in:
% cvs add README Makefile *.c *.h
(Include any other files you want in source control. If you want to leave some source or header files out that aren't actually part of your release, you can list the source files explicitly rather than using a wildcard.)
commit the files, this actually puts them into the repository:
% cvs commit -m "initial version"
The -m and string give the initial log message, use anything you feel appopriate. cvs commit works recursively, and will commit all the files you've added, even in subdirectories.
If you ever need to commit files individually, you can give the files on the command line. For instance, if you wanted foo.c and bar.c to have a different initial log message than the rest, then before doing a commit of everything (as above), you can do this:
% cvs commit -m "a different log message" foo.c bar.c
verify that everything looks good:
% cvs status | more
This will give details about every file in the repository. Each file should have a working revision and a repository revision of 1.1, and Status of Up-to-date. Sometimes I like a more concise summary with just the Status field:
% cvs status | grep Status
(note the upper case S on the Status in the grep)
For extra verification, check out a copy into a new directory and do a build. This will make sure you haven't accidentally omitted any files:
Make sure CVSROOT is set as in step 1 of the setup above:
% export CVSROOT=~/ts10-cvs
Make a new directory to check out into:
% mkdir ~/work2
cd into that directory
% cd ~/work2
check out the code:
% cvs checkout ts10
cd into ts10:
% cd ts10
build the code as usual:
% make
Once you've done that, you can blow away work2 if you like:
% cd ~ % rm -rf ~/work2
Package up the repository:
cd into the repository top-level directory:
% cd $CVSROOT
tar it up:
% tar -cvzf ~/ts10-cvs.tar.gz ./ts10
cd out:
% cd ~
Let me know if you run into any trouble.
Best regards, Eric