Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a checkout of a CVS repository. The original repository does not exist anymore. Would it be possible to run something similar to "export" on the checkout itself? What I would want to end up with, is the set of all files that came from the checkout, and remove the files that were added afterwards.

Example: I check out superProject, and get

And then I add
and then I would like to remove all the files that were not in the original checkout.

share|improve this question
up vote 3 down vote accepted

cvsu does an offline cvs update by comparing the timestamps of files on disk with their timestamps recorded in CVS/Entries. You can thus tell which files have been locally modified and which files are not known to be under CVS control.

sudo aptitude install cvsutils
cvsu --batch="tar cf export.tar " --types=AFGM

Run cvsu --help to see supported command line options. This functionality is provided by Perl, and can vary from one machine to another.

On Windows, Cygwin supports it.

share|improve this answer

Just noted your comment and edited my answer accordingly.

My initial answer was: simply remove all directories named "CVS"

Naturally, if more stuff has been added to the checked out directories, you should go a different route. CVS keeps its metadata in a CVS subdirectory in each checked out directory. The various files are described on p.16 of the Cederqvist manual.

In your case, the interesting information is kept in the Entries file, which has two different line formats:

/filename/...other stuff...

The first one for plain files, the second one for directories; there's no particular order.

You could write a script that walks down the directory tree, extracting directory and file names from these Entries files. You can feed this list into cpio -pmdv target-dir to create a copy of your directory structure, that holds exactly the files, a cvs export would have created.

I hope this helps

share|improve this answer
There are other files added to the checkout as well. – Christian Jonassen Jun 25 '10 at 10:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.