TRAX
track simulation,
the therapy planning TRiP
,
the gd
graphics program,
and possibly many others (SATAN
,...).
$CVSROOT
.
For the members of the bio
group this variable is set automatically
in the login profile. Additionally, most CVS commands allow to specify
this location directly.
All members of the bio
group have read access but
only members of the biodev
group have
write access to this pretty holy area.
$CVSROOT
area must be executed under
the process group biodev
. This is ensured by means of the
s-
bit set in all relevant directories.
Note:
The CVS installation active in Biophysics has adapted versions
of
$CVSROOT/CVSROOT/loginfo.sh $CVSROOT/CVSROOT/commitinfo.shto allow special actions after check-in, e.g. automatic generation of readable (and compilable) source copies.
mkdir <repository> export CVSROOT=<repository> # include this in some central profile cvsinitThis procedure is already completed for the biophysics.
cvs co CVSROOT cd CVSROOT
modules
. Add a line like
<project-name> <dir>where
<project-name>
is the name of your software project
and <dir>
is the name of a directory in $CVSROOT
which will contain
all files belonging to the project. Normally one would choose the
same name for both.
TRK TRK
cvs ci
<import-dir>
.
cd <import-dir> cvs import <dir> <vendor-tag> <release-tag> # import into repository cvs co -d $CVSROOT/../<dir> <project-name> # checkout readable copies into reference directory chmod g+w $CVSROOT/../<dir> # make that group-writablewhere
<vendor-tag>
and <release-tag>
are some dummy names needed by CVS to work.
cd TRKIMPORT cvs import TRK novendor norelease # import into CVS cvs co -d $CVSROOT/../TRK TRK # make reference copy for everybody chmod g+w $CVSROOT/../TRK # allow access for other developers cd .. # go back cvs co TRK # working copy for yourself
,v
, same as CVS.
Directly:
mkdir $CVSROOT/<project-name> chmod g+w $CVSROOT/<project-name> # allow access for other developers cp -p <project-name>/RCS/* $CVSROOT/<dir> cp -p <project-name>/* $CVSROOT/<dir> ... # additional stuff to be savedExample:
mkdir $CVSROOT/TRK cp -p $TRK/RCS/* $CVSROOT/TRK # the *,v files from RCS cp -p $TRK/* $CVSROOT/TRK # readable source files etc cp -p -r $TRK/TEST $CVSROOT/TRK # all subdirectories containg test stuff
mkdir CVS
Entries, Repository, Root
Entries
touch CVS/Entries
Repository
echo $CVSROOT/<dir> >CVS/Repository
Root
$CVSROOT
echo $CVSROOT >CVS/Root
mkdir $CVSROOT/<dir> cvs add <file-list> cvs ci
cd ~ cvs co <project-name>creates a directory
<project-name>
in your home directory
with all (!) sources of the given project.
If you want another destination directory you use
cvs co -d <other-dir> <project-name>Example:
cvs co -d TRKFUDGE TRKchecks out the complete
TRK
project to some alternative fudge
directory.
cvs co -d TRiP98-my2kx -r pre2kx TRiP98This requires the existence of the release tag
pre2kx
.
cd <project-name> ... edit etc. cvs ci <file> ... rebuild libraries and executables in repositoryExample:
cd TRK vi trkvol.c ... cvs ci trkvol.c make -f trk.make # rebuild object library libtrk.a make -f trk.m # rebuild executable trkCVS will store the source file into the central repository, but keeps a local copy in your working directory. If commit fails because someone else has checked in the same file with his/her changes goto the next step.
cvs update <file>to bring your local files in sync with the central repository. It might then be necessary to repeat the previous step.
<project-name>.make
to rebuild the object library lib<project-name>.a
and
a make file <project-name>.m
to rebuild the complete executable.
(e.g. trk.make
, libtrk.a
, trk.m
).
cd <project-name> cvs add <file> cvs ci <file>As above, you have to rebuild the associated library and the executable.
-kb
when files are added:
cd <project-name> cvs add -kb <file> cvs ci <file>
cd <project-name> rm <file> cvs remove <file> cvs ci <file>As above, you have to rebuild the associated library and the executable.
cvs rtag r9712 <project-name> # by last revision cvs rtag -D 2012-02-01 pre1107 TRiP98 # by datewill assign unique release tags
r9712
and pre1107
, respectively
to all files (recursively
through all directories) of the project.
Note that release tags must start with a letter.
One can get rid of them by e.g.:
cvs rtag -d wrongtag <project-name>
b9801
with one of the two possibilities:
cvs rtag -b -r r9712 b9801 <project-name> cvs rtag -b -D "31 Dec 97" b9801 <project-name>The branch
b9801
consists of all files with the tag r9712
in the first case
or all revisions not older than "31-Dec-97" in the second case.
cvs co -d <project-name>9801 -r b9801 <project-name>Updates and check-ins now only occur within the branch and the local working copies, the "main trunk" remains unaffected !
cvs co -d <project-name>merge -j b9801 <project-name>will first merge the differences between main trunk and branch recorded in the repository into a merging directory. Usually conflicts have to be resolved manually, then
cd <project-name>merge cvs ciwill store back the results into the repository. Note that the branch still exists.
cvs co -d <newproject-name>IMPORT -r b9801 <project-name>Remove all
CVS
directories in
<newproject-name>
IMPORT
<newproject-name>
)
as described in
Setting up a new project.
beam
and
all sources in project directory TRiP98/TEST/RBE
:
cvs co -r beam -d $CVSROOT/../TRiP98BEAM/TEST/RBE TRiP98/TEST/RBEOther example:
cvs co -d $CVSROOT/../TRiP98 TRiP98will produce reference copies for the entire
TRiP98
project.
emacs
as its default editor
for entering comments on check-in.
emacs
or faulty X session. In this case one may revert to
simpler editors like nedit
or even vi
:
export CVSEDITOR=vi