CVS-creme-de-la-creme
In space, no one can hear you scream. Unfortunately, in Sieg, they
can. This page describes a collection of simple to use, and generally
correct wrapper scripts that make it much more difficult to screw
up in CVS.
Simple Scripts
The scripts live in /afs/cs/project/spin/bin/cvsjr. Their purpose is
to handle all of the "niggly" little tasks that come up all the time
in the day of the life of a spinner. Most are just simple
combinations of sequences that we do all the time, and most of those
come directly from the CVS web pages in the SPIN tree.
Sounds great. How do I get started?
The only things you need to use these scripts are 1) a sense of
adventure, and 2) a CVSBRANCHTAG environment variable set to the name
of your branch tag.
Wow. That was easy. What can I do?
Whoaa... slow down pardner... before you use these scripts, you need
to understand that they are based on one poor caveman's interpretation
of the CVS pages and commands. THEY ARE NOT GUARANTEED TO BE CORRECT
nor are THEY SUPPORTED. If one of them fails, and it fails on you,
then you need to take quick action to find out what happened and
repair the script as quickly as possible. Ask not what these scripts can do for you. Instead, ask what you can do for these scripts!
On with the scripts...
For the examples below, I'll assume that your CVSBRANCHTAG is s6-caveman.
- cvs-mkbranch release-name target-name
- Creates a new tag in the repository called $CVSBRANCHTAG and checks
out all of the files from the target module of the named release. By
default, the target module is spin. This is
obviously useful if you plan to write code. For
example, to create a tag named s6-caveman that contains all of the files
in the spin-6 release, you might use it as:
cvs-mkbranch spin-6
Other targets include:
- kernel
- Enough to build only the kernel.
- libs
- Only the libraries
- compiler
- Only the compiler
- spindles
- Only spindles
- gdb
- Only gdb
- dlib
- Only dlib
- cvs-exists filename
- Tells you if the specified filename exists in the CVS repository.
This is useful for figuring out if you've got some bogus files that
you're trying to merge. The filename will be echoed with a preceding
letter. For example, cvs-exists sirpa.m3, could return
- U
- the file is undefined in the repository.
- F
- the file has been found in the repository.
- N
- the filename contains a non-existent directory.
- cvs-forcetag filename
- forces filename to be tagged as part
of your branch. I forget why you need to do this, but it came up a
couple of times. I think this may be obsolete.
- cvs-mkdir dirname
- makes the specified directory in your branch, and adds it to the
repository. It does a final cvs update -A, which I always forget, and
I even forget why it's necessary. But, it's there for you.
- cvs-newfile filename
- adds and commits the specified file to your branch. The file is
also added into the repository. This is useful when you need to make a
new file.
- cvs-remove filename
- removes the named file from your branch
and from the repository. In your branch, the file is physically moved
into filename.cvs-removed so you can recover it if necessary.
- cvs-sticky filename
- forces the name file to be made "sticky" with your CVSBRANCHTAG.
I can't remember why this was necessary, so it may be obsolete.
- cvs-getfile release filename
- gets the single file from the
named release and puts it into your branch. This is useful for
properly picking up new files into your branch.
- cvs-check path_to_top_level path_from_top_level
- This command will check your tree against
the latest tree, and flag all the files that have either changed,
been removed, or created.
- cvs-inlatest filename
- Will check if "filename" (or path to filename) is in latest.
- Eg, cvs-inlatest sys/src/shell