Note that you can only use cvs add
on files and folders that are located inside an already checked out working copy, otherwise you will get the "Cannot open CVS/Entries for reading" message. A technique for creating a new "root module" using cvs add
is explained in this WinCVS FAQ item: http://cvsgui.sourceforge.net/newfaq.htm#add_rootmodule
If you are on Windows, both TortoiseCVS and WinCVS support recursive addition (and optional commit) of multiple files in a single operation. In WinCvs look for the macro Add>Recursive Add (auto-commit)... In Tortoise use the Add Contents command on a directory. Both will allow you to select which files to add and what keyword expansion modes to use for them (mostly used for defining which files are binary).
For further info about recursive add in WinCvs look here: http://cvsgui.sourceforge.net/newfaq.htm#cvs-add_recursive
Apart from that cvs import
is well suited for mass-additions. However, the way cvs import
is implemented in vanilla CVS has two drawbacks (because it was originally written for third-party code):
- it creates a mandatory branch with special semantics.
- it does not create the repository meta-data (i.e. the hidden CVS directories) needed to establish the imported code as a checked out working copy, which means that in order to actually work with the imported files you first have to check them out of the repository
If you are using CVSNT you can avoid both drawbacks by specifying the -nC
option on import. -n
is for avoiding the "vendor" branch and -C
is for creating the CVS directories.