cvs, "file should be removed and is still there (or back again)"
Asked Answered
E

2

9

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?

Earley answered 17/8, 2009 at 11:17 Comment(0)
E
14

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"

Earley answered 17/8, 2009 at 12:38 Comment(2)
I was hit by the same problem today. The cvs commandline is really hard to use and I'm really happy you got a workaround. Sidenote: I personally love the name of the temporary file.Carillo
A sense of humour is vital in this biz :DEarley
C
0
cvs add FILE

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

cvs update -C FILE
Commutative answered 17/8, 2009 at 12:3 Comment(1)
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 normalEarley

© 2022 - 2024 — McMap. All rights reserved.