-
Create a directory where you want the repository to reside - You'll
probably want the repository to reside in your home directory of your unix
account. Decide on a name for the directory, such as cvsroot. All we need
to do is just create the directory.
%mkdir cvsroot
-
Initialize the repository - Tell CVS you want to initialize the
repository, which is done using the cvs "init" command. Assume your
unix account is on Waldorf and your username is "team-alpha"
%cvs -d /users/cscstd/qrst/team-alpha/cvsroot init
This initializes the repository and creates the appropriate administrative
files needed by cvs. You must provide the full absolute pathname of the
desired directory.
-
Put your project source into CVS - For this example, assume there
are two files named AppMain.java and AppGUI.java in a
directory src/current and we want to "import" them into the CVS
repository. Assume we've decided to call our project "myproject."
%cd src/current
%cvs -d /users/cscstd/qrst/team-alpha/cvsroot
import -m "Creating project from imported source"
myproject Team3 start
(The three lines above are to be entered as one command.)
In this example, "myproject" is the name you desire for CVS to use to
identify your project. "Team3" and "start" are the "vendor tag" and "release
tag". These can be anything you want them to be and you won't refer to
them exept in unusual circumstances. The string after the -m parameter
will be entered into the CVS log for this transaction.
You probably should delete the original source files in src/current
after importing them because now CVS is controlling everything.
-
Check file permissions - You must make sure that the other users
have read/write/execute access to the repository directory. If everyone
on the team belongs to the same UNIX group then you everything should
be fine. Just be sure that the group owns the directory that contains the
repository. In other situations, you may have to set file permissions.
Refer to the CVS manual for more information.
That's it! The repository is now ready for access by your team.