All our code is held at a CVS repository on glacier.lbl.gov. All developers
have read and write access to this repository. In order to make best use
of this repository, please follow a certain set of rules. You are kindly
asked to start from what you checked out from that repository and add whatever
you achieved back onto that repository.
This repository is very
precious as it holds the results of all our efforts.
Please adhere to the following schema for the usage of this repository:
check out the package in the morning
work on your project, making changes to existing files, creating new
directories or files as required in your workflow
add any new directory or file immediately after creation to the cvs
(c.f. below)
every time you achieved a major step forward commit your files to cvs
in the evening, update your local copy before you commit your files
to the repository (c.f. below)
A procedure like this has several advantages:
the repository is always very close to up-to-date
inconsistencies between you and other developers show up very early
and can be resolved before they might create a real problem
if you want others to have a look at your files, ask them to have a
look at what you just checked in
no mail hassle, lost attachement, 'forgot the file on my laptop at
home' etc
Please use ant to
create a new package
create a new class
create a jar file.
Here are the steps and
the commands you want to use with ant:
cd to your workspace directory and have the setup script called: cd ~/work
source setup.sh (for tcsh: source setup.csh)
create a package: ant -DPROJECT=[insertProjectName] -DPACKAGE=icecube.[whatever.project.or.subproject]
createPackage
create a class: ant -DPROJECT=[insertProjectName] -DPACKAGE=icecube.[whatever.project.or.subproject]
-DCLASS=[insertClassNameWithoutJavaEnding] createClass
create a jar file (compile / build the code): ant -DPROJECT=[insertProjectName] lib
Here are the steps and
the commands you want to use with cvs:
cd to your workspace directory and have the setup script called: cd ~/work
source setup.sh (for tcsh: source setup.csh)
checkout the project from the repository: cd ~/work
cvs checkout domtest
tell the repository about a new file or directory: cd ~/work/domtest
cvs add [whatever/file/or/dir/you/just/created]
UPDATE:
Update examines your directory (which
ever one you are currently in), and compares this to whatever is on the repository.
If someone has checked in a file into the repository, that change will appear
in that file in your directory. So far, this seems identical to checking
something out. The difference is that update doesn't write over files that
you have edited. If the code you have written conflicts with the code someone
else has checked in, Update will point this out, and let you make appropriate
changes to your code, and eliminate the conflict. Always run update before you
commit something to the repository, as this keeps errors from creeping in.
update your domtest project
before you commit something
before you look at stuff somebody else has just committed and wants
you to have a look:
cd ~/work/domtest
cvs update
COMMIT:
Commit will permanently change the directory, so be careful with its use.
Commit will change files in the repository only in your current directory,
so to be safe, one should cd to the smallest directory that encompasses
all of the changes, and then Commit (After one has run Update, of course).
Commit opens a vi editor so that one can enter a message, letting everyone
know what changes have been made. Tips on the use of vi will be found below.
push your changes into the repository permanently: cvs commit
see the vi hints below, how to enter comments about your changes (please
be as specific as possible)
Here are the steps and
the commands you want to use with the vi
editor:
you will need to handle the vi
editor to enter a comment if you check things into the repository. Enter your
name and what you have done to the code or diagrams that you commit (check-in)
to the repository.
vi is a terminal-based editor, quite powerful but somewhat strange to handle
in the beginning. It has different operation modes. To leave any operating
mode, hit ESC. A choice of letters you enter after brings you into the available
modes, e.g. a letter 'a' brings you in the so-called 'insert' mode. Commands
to the vi itself are entered after a colon. Here is the miminal sequence
of commands you will need:
To start editing after the vi opened,
enter the letter 'a'. This
will put the message 'INSERT' at the bottom of the page. Type whatever
you find important and informative for the others to read.
When you are done, press the
ESC button of your keyboard.
Type the sequence ':wq' (that
is a colon, followed by the letters 'w' and 'q'), which will 'w'rite that
file and 'q'uit the vi in one step, intitiating the actual check-in.