my dog learned polymorphism
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 this week in the OCAJP 8 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: 88

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: 17151

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.

An IDE is no substitute for an Intelligent Developer.
John Farrel
Ranch Hand

Joined: May 24, 2010
Posts: 88
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
jQuery in Action, 3rd edition