CVS: recursively add files

Have you ever worked in a CVS module, added a deep tree of directories and files and needed to add them to CVS. If you have, you may have had to go through a painful process of adding one dir at a time, then all the files in that dir, then repeat until you’ve done all the dirs. I have a solution for that:

Just run this over and over again, until all files are added:

Note: careful, prune your directories first, it will add all files it finds!

cvs add `cvs -q update | egrep “^? ” | sed -e ‘s/..//’`

now do:

cvs -q update

are all your files added? If not, repeat process until they are.

Dave.

Comments are closed.