Java Reference
In-Depth Information
which will prompt you for a password. Having logged in once, you will not
need to log in again, even after reboots of your system, as CVS keeps the
password (by default; it can be changed) in a file called .cvspass in your home
directory. This makes using CVS with a remote repository (once you've logged
in as simple as if the repository were local). From here on, the commands will
all look the same. If your repository is remote, CVS will use the password from
your .cvspass file, without asking you for it.
8.2.2
Are you wanting to use CVS on an existing project? Have you already got your
project at least partly underway? Let's look at how to enter all those files into
CVS with a single command.
Not every file that is in a working directory needs to be kept under source
control. Some, like .class files, are created from the .java source files. Others
may be just scratch files that you don't want to keep versioned.
To automatically exclude certain files from ever being included in your
repository, CVS uses a file called .cvsignore that lists filename patterns. Any
filename matching a pattern will be ignored by all CVS commands.
Here is a .cvsignore file that we recommend for Java developers:
Import
*.zip
*.class
This will exclude any file whose name ends in .class or .zip . Note that
the comparison is strictly based on a name, not the actual contents. CVS
doesn't know what a “class” file is; it is only excluding a file based on its name.
Certain files are not really source files and can't be managed as such, but
we would still like to keep versions and a history of changes for them. A good
example would be an image file. For example, you may have a corporate logo
in a file called logo.jpg and at some point you may get a new or revised ver-
sion of that file. You can use CVS to track such files, but you need to tell CVS
that this is a binary file, so that CVS doesn't try to do some special substitutions
that it does on check-in and check-out. (More about those substitutions later.)
For now, let's just consider how to tell CVS which files are binary. We can
do that on the command line when we create a new file, but for importing a
lot of files at once, and to avoid the need to remember doing that each time we
add a file, we can put patterns for binary filenames in a CVS file called
.cvswrappers .
Search WWH ::




Custom Search