mkdir ~/cvs export CVSROOT=~/cvsSet $CVSROOT permanently in you .bashrc file.
To create a repository, run the `cvs init' command. It will set up an empty repository in the CVS root:
cvs init OR (overwriting the environment variable): cvs -d /home/fred/cvs init`cvs init' is careful to never overwrite any existing files in the repository, so no harm is done if you run `cvs init' on an already set-up repository.
cd projects/swoop cvs import -m "Woxy starts SWOOP project" swoop Woxy start
Unless you supply a log message with the `-m' flag, CVS starts an
editor and prompts for a message.
The string `Woxy' is a "vendor tag",
and `start' is a "release tag".
They may fill no purpose in this
context, but they must be present.
Make a backup and erase the original sources, to make sure that you do not accidentally edit them.
Check that the permissions CVS sets on the directories inside `$CVSROOT' are reasonable (that they belong to the proper groups).
mkdir projects/swoop cd projects/swoop cvs import -m "Woxy starts SWOOP project" swoop Woxy startThen, use the add command to add files (and new directories) to the new CVS-project.
On unix, if there is a group named `cvsadmin', only members of that group can run `cvs admin'. This group should exist on the server.
Useful Options:
`-l[REV]'
Lock the revision with number REV.
This can be used in conjunction with the `rcslock.pl' script in
the `contrib' directory of the CVS source distribution to provide
reserved checkouts (where only one user can be editing a given
file at a time).
The most important of these files is the `modules' file. It defines all modules in the repository. This is a sample `modules' file.
CVSROOT CVSROOT
modules CVSROOT modules
cvs gnu/cvs
rcs gnu/rcs
diff gnu/diff
swoop projects_john/swoop
The `modules' file is line oriented. In its simplest form each line
contains the name of the module, whitespace, and the directory where
the module resides. The directory is a path relative to `$CVSROOT'.
Editing Administrative Files:
You can edit administrative files directly
in the same way you edit other modules.
To get a working copy, use:
cvs checkout CVSROOTEdit the copy, and commit your changes in the normal way.
In the `~/.cvsrc' file you can add default options to
`cvs_commands' within cvs
(instead of relying on shell aliases).
The `~/.cvsrc' file is searched
for a line that begins with the same name as the `cvs_command' being
executed. If a match is found, then the remainder of the line is split
up (at whitespace characters) into separate options and added to the
command arguments _before_ any options from the command line.
Example:
diff -u
update -P
commit -m
checkout -P