CVS instructions for creating repository 

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 '% '.

  1. 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.)
  2. Create the repository directory:

    % mkdir $CVSROOT
  3. Tell CVS to initialize the repository:

    % cvs init
  4. 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
  5. 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.)
  6. 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.
  7. cd into the source directory:

    % cd ts10
  8. 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.)
  9. If you have subdirectories, cd into them and do a cvs add on them as well. cd back to the top (ts10) directory when you're done.
  10. 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
  11. 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:

  1. Make sure CVSROOT is set as in step 1 of the setup above:

    % export CVSROOT=~/ts10-cvs
  2. Make a new directory to check out into:

    % mkdir ~/work2
  3. cd into that directory

    % cd ~/work2
  4. check out the code:

    % cvs checkout ts10
  5. cd into ts10:

    % cd ts10
  6. 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:

  1. cd into the repository top-level directory:

    % cd $CVSROOT
  2. tar it up:

    % tar -cvzf ~/ts10-cvs.tar.gz ./ts10
  3. cd out:

    % cd ~
  4. If you like, email me the repository and I'll test it on my system to make sure there are no problems. However, if you've followed the steps above, I think it should be fine.
  5. scp the file to SourceForge: scp ts10-cvs.tar.gz sword7@ts10.sourceforge.net:/
  6. Submit a request to the Sourceforge CVS people to import the repository - for directions see http://sourceforge.net/docman/display_doc.php?docid=768&group_id=1

Let me know if you run into any trouble.

Best regards, Eric