1

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.

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
G__
  • 294
  • 2
  • 9

2 Answers2

1

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}
done

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.

DerfK
  • 19,313
  • 2
  • 35
  • 51
  • 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. – G__ Feb 09 '11 at 18:01
1

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.

G__
  • 294
  • 2
  • 9