Some development files and resources of a project are checked in to a CVS repository.
Policy states that the version on CVS should build correctly when checked out into a local Eclipse IDE.
Therefore, some files are added that only contain a basic set up.
The developers will change those files to suit their personal needs, but also according to their test environment (containing local paths, etc.).
(I’m not talking IDE configuration here, those files aren’t checked in of course.)
CVS won’t let me add files to .cvsignore that are already checked in.
How do I maintain a basic version of the files in the CVS repo but have a modified copy in my local working copy that I don’t want to commit?
My only solution so far is not committing project or even folder-wise, but only single files excluding those special ones manually. Can I improve on that?
The only improvement you can do to create one point only where you switch configuration in order to minimize the number of files that need customization by developer. For example, if you have Java servlet, you could add something like this
to your
web.xmlfile and then put your setting into that file. In this case,productionSetup.xmlwill be the official production configuration. William, the developer, will checkout the productionSetup.xml, will do a copywilliamEnviroment.xmland will edit his personal settings. To run the servlet with his own configuration, he needs only to change theweb.xmlinparam-valueattribute without doing commit on that file.Of course
web.xmlcan be changed in future to add new parameters or whatever needed by the servlet. William has to manually check if there are new versions of that file, but it’s one file only to be monitored and the merge will be trivial.This answer is partially based on a similar experience I had at work.