views:

472

answers:

2

I am trying to commit a project in which a file has been "cvs remove"d, but actually needs to be there. The contents has been completely rewritten, but it needs to retain the same name.

I am unable to either commit the project or re-add the file without getting this annoying error message. How do I "unremove" a file in CVS?

+1  A: 
cvs add FILE

Or, alternatively, if you want to get the latest copy back from the repository

cvs update -C FILE
kdgregory
Sadly neither of these answers worked for me.(the question does say I can't re-add the file) For some reason we are using version '1.9.28' cicra 1998, so CVS is even more annoying than normal
Chris Huang-Leaver
+3  A: 

This worked for me;

Rename the file

mv mistakenly_removed_file wtf

Ask cvs to add the old version:

cvs add mistakenly_removed_file

CVS than reports it has resurected the removed file.

mv wtf mistakenly_removed_file

cvs status reveals that the file is now "locally modified"

Chris Huang-Leaver