Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 partial CVS repository - a copy of a subfolder within the master repository, and I'd like to do a checkout of head. I've tried doing this directly:

$ cvs -d /path/B2MEj/ co B2MEj
cvs [checkout aborted]: /path/B2MEj/CVSROOT: No such file or directory

My copy does not contain CVSROOT (since it was a subdirectory of the original repository root, I assume).

How can I get a clean shapshot of the latest version of files in this folder? I don't care about retaining any version history as this is a one-way extraction for me.

share|improve this question

Without CVSROOT, cvs knows absolutely nothing about what's in your folder, since all of the file and version information was in that one CVSROOT directory.

What you'll have to do is use RCS to extract the most recent version of each ,v file, individually, which should work with something like the following in bash:

for fn in *,v; do
  co ${fn%,v}

Since RCS's co command expects the original filename we have to find all the ,v files and run co with the filename minus the ,v.

Once that's done you'll have to sort out the code from the ,v files.

share|improve this answer
Thanks, definitely the manual way of doing it, but it does extract the files. I found a "better" way that worked for me, which I'll post in another answer, but +1 here b/c this could still be a useful technique if my ultimate solution doesn't work for every case. – Greg Feb 9 '11 at 18:01
up vote 1 down vote accepted

It seems that all the necessary information is contained within the ,v files and Attic directories within my partial repository. The key is to simply create an empty CVS root with cvs -d /workingdir init and then copy the original (partial) repository folder into workingdir. At that point a simple cvs -d /workingdir co B2MEj (or whatever your project name was) will do the full checkout.

share|improve this answer

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.