Search code examples
directorycvs

Add new directory within subdirectory using CVS


How does one add a new directory within a subdirectory using a CVS repository?

cvs add [new_dir_name]

simply creates a new directory on the first level of the repository, while going into the subdirecory I am interested in and adding does not work. i.e.L

cd  repository/directory
cvs add [new_dir_name]

Produces an error:

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

(This error message, though, still happens when I check out the repository).

Any ideas how to do this?


Solution

  • cd  repository
    mkdir a
    mkdir a/b
    mdkdir a/b/c
    
    cvs update -d a/b/c ( not sure if in one go works, if not, try one after another) 
    

    The option -d will create directories that are missing. The same should work for add, if you cvs update afterwards and commit to persist it.

    Personally I would use git or svn - changed from cvs ~10y ago