Search code examples
directoryadditioncvs

CVS add directory/ error "there is no version here; do `cvs checkout' first"


Using Terminal (on Mac OSX 10.8.x) whenever I try to add a directory within my project

project_root jacob$ cvs add foo/
project_root jacob$ cvs add ./shared/foo/
project_root jacob$ cvs add /full/path/foo/

CVS complains:

cvs add: in directory `.':
cvs [add aborted]: there is no version here; do `cvs checkout' first

Also, I've heard cvs does not like to create empty directories and it doesn't like to create a directory with only directories inside of it (no immediate children being files), so inside of foo/ is just an empty file named blank.txt.

Running cvs checkout project does not help.

This message is ridiculous; obviously there is no version—that's why it's called add!

P.S. Upgrading to svn/Git is, sadly, not an option at this time.


Solution

  • OMG, cvs is a terrible joke: the current working directory must be the immediate parent of the directory being added:

    project_root jacob$ cd shared/
    project_root jacob$ cvs add foo/
    Directory /…/foo added to the repository
    

    source