Why isn't CVS giving me the code files?
July 9, 2009 12:03 PM   Subscribe

What could I be missing with CVS? Checkout only gives me header files even though I can see that there are code files in the same directory.

I have been provided a CVS repository to work with. Using WinCVS I can traverse the repository and can see what files are in each directory and know that there are a mix of header and code files. When I try to checkout modules, the directory structure gets created and the header files are there, but the code files are not extracted. I've tried a bunch of stuff without avail. Note that this is a copy of the repository, and I cannot be sure it was created correctly. What do I check?
posted by procrastination to Computers & Internet (4 answers total)
Best answer: I'm not sure how WinCVS works, exactly, but seeing as CVS operates on the filesystem, is it possible that it is showing you every file in the directories housing the repository, as opposed to just those files that have actually been cvs add'd to the repository?

You can run cvs status on a file or list of files to see what the repository actually thinks about them - if you get a bunch of question marks, the files aren't actually in the repository.

If that fails, what happens when you run cvs update on the path of a file that should be getting checked out?
posted by jordanlewis at 12:30 PM on July 9, 2009

Response by poster: I think you might be onto something, jordanlewis. I can see the files in the repository structure, but CVS claims to know nothing about them when asked about their status. The files themselves have all the CVS information at the top of the file, so they were part of the repository at some point. The CVS info also makes them hard to work with, particularly non-text files.

I also realized that WinCVS is showing me which are under version control by putting a ,v after the file and I can see that the source files are not so marked.

Any ideas on fixes? I can't imagine what would happen if I added a file to a repository where if already was, especially with the CVS cruft at the top.
posted by procrastination at 12:49 PM on July 9, 2009

Yeah, it sounds like the repository you've been given is pretty badly messed up. (You do mean repository, and not working copy, right?) If I were you, I would ask whoever is in charge to just let you check out directory from the master repository, as CVS can be a real pain when you start keeping multiple copies of the repository around.

If that's impossible, then you can just run cvs add on all the missing files - you'll lose the actual revision history, but since you never had it in the first place, I don't suppose it will make a difference. The CVS id strings that you see at the tops of files will automatically get rewritten by CVS whenever something changes about the file, so you needn't worry about that.
posted by jordanlewis at 1:00 PM on July 9, 2009

Whoops, I meant directly, not directory in that second sentence. Heh.
posted by jordanlewis at 1:01 PM on July 9, 2009

« Older Sound-proof wood floors   |   Disassembling a large file, moving it, and... Newer »
This thread is closed to new comments.