CVSで一度削除してしまったファイルを復活させる

削除(cvs remove)後、コミットしてしまった場合

削除後、コミットしてしまった場合、同じ様に「cvs add」すると、以下のようにメッセージが表示されます。

% ls
CVS/                    feedback_complete.cgi*  feedback.html*          

% cvs remove -f feedback.html
cvs remove: scheduling `feedback.html' for removal
cvs remove: use 'cvs commit' to remove this file permanently

% cvs ci -m "test"
cvs commit: Examining .
Removing feedback.html;
/repository/contact/html/feedback.html,v  <–  feedback.html
new revision: delete; previous revision: 1.2.2.4
done

% ls
CVS/                    feedback_complete.cgi*       

% cvs add feedback.html
cvs add: file `feedback.html' will be added on branch `live' from version 1.2.2.5
cvs add: use 'cvs commit' to add this file permanently

いかにも復活できそうですが、ls の結果は、以下の通り、ファイルは存在しません。

% ls
CVS/                    feedback_complete.cgi*

ここで「cvs commit」をした場合、以下のように表示され、追加できません。

% cvs ci -m "test"
cvs commit: Examining .
cvs commit: Up-to-date check failed for `feedback.html'
cvs [commit aborted]: correct above errors first!

もし、全く新しいファイルがあれば、それをコミットすることは出来ます。

% ls
CVS/                    feedback_complete.cgi*       

% touch feedback.html

% ls
CVS/                    feedback_complete.cgi*  feedback.html*          

% cvs ci -m "test"
cvs commit: Examining .
Checking in feedback.html;
/repository/contact/html/feedback.html,v  <–  feedback.html
new revision: 1.2.2.6; previous revision: 1.2.2.5
done