Java Reference
In-Depth Information
Using an existing working directory
Under
CVS
, each directory in your local working directory (including the root
folder) contains a special directory named
CVS
that holds files used by the
CVS
cli-
ent to keep track of state information such as the version numbers of the files
you've checked out, files you've added, and the address of the repository they
came from. If you have an existing working directory that is in your
IDEA
project's
source path, and you've enabled
CVS
for your project,
IDEA
autodetects these
CVS
control folders and begins using version control for those files immediately. No
additional configuration is required.
8.2.2
Working with files under CVS control
Of course, life isn't all updates and bug fixes. Sometimes you add new code to the
system or remove old classes from the source tree. This is a nice aspect of utilizing
IDEA
's integrated version control system support over a stand-alone client, espe-
cially when you consider
IDEA
's refactoring capabilities.
Adding new files and directories
IDEA
automatically attempts to add new files and directories that you create from
within the editor to the
CVS
repository. If you're creating a new file and don't wish
to add it to the repository, click
Cancel
when prompted (unless you've turned off
dialogs for the
Add
command). If the file was created outside of
IDEA
, you must
add it manually by right-clicking the file (you can select several files if you wish)
and selecting
CVS
| Add File
. Newly added files aren't committed immediately;
they remain in limbo until you're ready to commit other changes. That's why
CVS
refers to adding a file as
scheduling a file for addition
. Directories, on the other
hand, are added to the repository immediately under
CVS
.
IDEA
lets you perform additions and deletions of an entire folder struc-
ture, recursively. Select a folder to add or delete, and it, along with all of
its children, will be added to or deleted from the repository. This is a big
time saver for importing new code into an existing module. If you're cre-
ating a new
CVS
module, however, the
Import into
CVS
command is a
better fit because it lets you create a new directory and add files in a sin-
gle step.
TIP
Removing a file from the repository
You can remove files from the repository when they're no longer needed. You can
also delete files that you've added to the repository but not yet committed. If you