File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes silly question about CVS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "silly question about CVS" Watch "silly question about CVS" New topic

silly question about CVS

Raj Ohadi
Ranch Hand

Joined: Jun 30, 2006
Posts: 316
just new to CVS. How do I create a new directory or folder in a module ? Can I do it in my CVS client ? Please tell me how to use the CVS client GUI to do it. I just can't find it by clicking around...

Also, do I have to do it on the CVS server side ?
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
What CVS client are you using?

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

It's not a silly CVS question - it's a question about silly CVS!

There are only 2 ways I know that you can add a directory to a project and get it into CVS without explicitly telling CVS to add it: The Eclipse IDE and the Emacs Java plugin. These 2 IDE systems are smart enough to figure that if you added a directory to a source-code-managed project and you didn't explicitly exclude it from source code management, that by gosh, maybe you actually wanted it to be source-code managed.

The stock CVS tools, both command-line and GUI (e.g. Tortoise), and even the IntelliJ IDE have to be explicitly told to add the directory to CVS, or it won't go in, and someday years later when you check out a clean copy for an emergency build, you'll find that out the hard way. Although if you manage things using the right IDE options in Intellij, it might have given you a small boost.

If I sound bitter, it's because I've learned such things at my cost.

There's another complication, as well. CVS doesn't ever actually archive directories, only files. So even the "helpful" IDEs won't add empty directories - at least one file has to be present in that directory before it will get added to the archive, even if it's just a dummy file.

Subversion was developed more or less specifically because of this problem and the related problem that CVS isn't very good at tracking file and directory rename operations. Subversion has its own annoyances, however. I'll leave them for another time.

An IDE is no substitute for an Intelligent Developer.
It is sorta covered in the JavaRanch Style Guide.
subject: silly question about CVS
jQuery in Action, 3rd edition