cvs, “file should be removed and is still there (or back again)”

跟風遠走 提交于 2020-01-01 08:47:13

问题


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:


This worked for me:

  1. Rename the file

    mv mistakenly_removed_file wtf
    
  2. Ask cvs to add the old version:

    cvs add mistakenly_removed_file
    
  3. cvs then reports it has resurrected the removed file.

    mv wtf mistakenly_removed_file
    

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




回答2:


cvs add FILE

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

cvs update -C FILE


来源:https://stackoverflow.com/questions/1287401/cvs-file-should-be-removed-and-is-still-there-or-back-again

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!