Java Reference
In-Depth Information
used, though, to set up the project. Once a project is established, the informa-
tion in CVSROOT is kept, along with other data, in a directory of files (called
CVS ). From that point on, CVSROOT (the environment variable) no longer needs
to be set. The CVS commands will always use what is in the local sandbox to
determine where the repository is; the value of the environment variable will
be ignored.
It is possible to have different repositories for different projects. One
repository might be for your personal work—revisions of memos and docu-
ments that you create on your local machine and store in a repository also on
your local machine. Another repository might be a shared network-based
repository, used for a project at work. Still another might be a network-based
project for some Open Source work that you do in your spare time. Since the
CVS repository keeps track of whence it comes, you needn't set a value for
CVSROOT every time you switch projects. Instead, CVS knows from within the
sandbox where to go for its updates, commits, and so on.
So let's get started and create a CVS repository on our local Linux system,
in our own home directory. We will call the repository srcbank , as it will be
the “bank” where we will deposit our source files.
$ mkdir ${HOME}/srcbank
$ export CVSROOOT="${HOME}/srcbank"
$ cvs init
The mkdir creates the directory named srcbank as a subdirectory of our
home directory. The export command sets the shell variable CVSROOT to refer
to the location of the new directory. The cvs init command initializes the
repository with some needed directories and data files.
Before the cvs init command, the srcbank directory is empty. After-
ward it contains a directory called CVSROOT (literal name, not the shell variable's
value) which contains a variety of administrative files—most of which you need
never worry about.
If your are using a remote repository, that is, one that you connect to over
a network (typical when you are sharing a repository amongst team members),
then you need one additional step—you need to log in to the CVS repository's
server:
$ cvs login
Search WWH ::




Custom Search