delphij's Chaos

选择chaos这个词是因为~~实在很难找到一个更合适的词来形容这儿了……

04 Sep 2004

How to remove a whole tree from CVS?

Sometimes CVS is very nasty when operating. For example, when you want to remove a whole tree (including zillion sub-directories and files) you may have to enter commit log (at least, confirm) for every directory, if you are going to do a “cvs ci” in the top level directory.

It is possible to solve this problem with simple Unix(R) commands:

First: Prepare our file list.

find . -type f | grep -v /CVS > ../list

Then: Remove the files.

rm `cat ../list`

Third: Remove these files in repository.

cvs rm `cat ../list`

Finally, remove all files by using “cvs ci”.

cat ../list | xargs cvs ci -m “Remove files from repository.”