How to remove a whole tree from CVS?

• 本文约107字,阅读大致需要1分钟 • Development

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® commands:

  1. Prepare our file list:

    find . -type f | grep -v /CVS > ../list
  2. Remove the files:

    rm `cat ../list`
  3. Remove these files in repository:

    cvs rm `cat ../list`
  4. Remove all files by using cvs ci:

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