tags:

views:

18

answers:

1

Hello I am using a custom library which has a lot of files. Now in order to use that library I need to add all the files of that library to the local CVS. So when I cvs update, it shows me all the files that are unavailable on CVS, and this library has a lot of files. So I have to cvs add first to add files to cvs and then commit. Is there a method to cvs add a folder and not a file??

A: 

Most GUI frontends for CVS(NT) contain a feature that does this. That is usually the easiest approach.

There's also the cvs import command which is specifically intended for versioning third party code inside your own repository but also has a few quirks and is not exactly trivial to use especially if not all your files are of the same type. It also doesn't really work well when the folder hierarchy to be added already contains folders and/or files that are already under version control. I recommend looking up the docs for the cvs import command anyway.

Apart from that you would have to script the mass addition by recursively iterating over all folders that are not named "CVS" and then cvs adding first the folders and then the files within them. You might want to build in some mechanism for ignoring certain file types or using a specific -k option for others (e.g. binaries with -kb or -kB).

Oliver Giesen