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 cvs - check in all updates and deletes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "cvs - check in all updates and deletes" Watch "cvs - check in all updates and deletes" New topic

cvs - check in all updates and deletes

John Farrel
Ranch Hand

Joined: May 24, 2010
Posts: 85

Is there a simple way blanket override the contents of a cvs module?
I am auto-generating code, which may change filename and directory structure between generations. I want to be able to overwrite whatever is in cvs with whatever I've just generated.
Ideally I want to remove directories and files that may disappear by the generation as well.

Do I have to run an pseudo-update to get the list of modified/deleted/added files and run appropriate cvs commands on each file?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16387

CVS is notoriously bad at handling the renaming of files and directories, and for that matter, handling empty directories. That is why Subversion was developed and largely replaced CVS in modern-day development. At least when people aren't using git. Or mercurial. Or whatever.

You can do a CVS checkin to commit an entire subtree of a project with no problem, but when you rename files and directories, the newly-named objects are not considered "renamed", they are consider as new adds (assuming no re-use of existing named). And as new adds, they have to be added to the CVS project. If you then look at the CVS archive, you'll see all the old names plus all the new-add names and if you retrieve the project, that's what comes down. Yuck.

There are basically 2 ways to handle that. 1) use crude violence to mutilate the backup files on the CVS archive. Which will destroy your ability to retrieve pre-mutilation editions. or 2) import the project as a whole new project. After first disconnecting it from the old CVS project. Double yuck.

Customer surveys are for companies who didn't pay proper attention to begin with.
John Farrel
Ranch Hand

Joined: May 24, 2010
Posts: 85
I'm doing this the hard way; getting a list of all modified, deleted and added files and performing appropriate cvs commands.
I'm not too fussed about keeping history as long as all the correct files are in version control.
I agree. Here's the link:
subject: cvs - check in all updates and deletes