Saturday, April 11, 2009

Recursively add folders and files in CVS

One thing I really like about subversion is that an "svn add" on a folder recursively adds the folders and files inside that directory.

It's not the case with CVS, you can always do a "cvs import" but if you really need to use "cvs add", then you may find the following useful:

To recursively add directories inside a folder that is already under CVS :

find . -type d -print | grep -v CVS | xargs -n1 cvs add

To recursively add files inside a folder that is already under CVS :

find . -type f -print | grep -v CVS | xargs -n1 cvs add