This patch for cvs-1.11.22 prevents CVS from nuking your private workspace data when you're talking to an unreliable CVS server.
None of the problems described below will happen if the CVS server is reliable. However, if you're hosting with companies like dreamhost.com, you need to prepare for disaster (I lost data this way, that's why I wrote the patch).
To enable the patch, compile the cvs source with it:
$ tar zxf cvs-1.11.22.tar.gz $ cd cvs-1.11.22 $ patch -p1 <../cvs-1.11.22-safe-patch.txt $ ./configure $ make $ sudo make install
By default, the patch will be disabled, to enable it, modify your ~/.cvsrc file and add the new --safe-mode option:
### ~/.cvsrc cvs --safe-mode
There's two horror scenarios in which CVS will lose data on the client side if the server provides false information:
$ cvs upd cvs update: Updating . cvs update: `abc' is no longer in the repository *SAFE MODE* Protecting against removing abc Copying abc to abc.cvsbakThe server version of a CVS file gets reset to a previous revision. This can happen if a careless server administrator resets the server to a previous backup baseline without telling the clients. If the unsuspecting client then runs 'cvs update', CVS will nuke the local copy (given that it was checked in) and replace it by the outdated server copy.
$ cvs upd cvs update: Updating . U abc *SAFE MODE* Protecting against renaming .new.abc to abc Copying abc to abc.cvsbak
If you need to disable safe mode temporarily for one command although by default it is enabled in ~/.cvsrc, use the -F option:
cvs -F upd
and CVS will override
Mike Schilli, 2007, firstname.lastname@example.org
Latest update: 18-Oct-2014