tags:

views:

353

answers:

3

Hi

I am using cvs -tag -b "abcdefg" command to tag-branch in my CVS. My cvs repo has an empty directory "obj" in every folder.

Whenever I use the command cvs co -r "abcdefg" REPO, I get a complete repo minus the empty folders. I tried using -f option too but it did not work. What is the way to get out of this?

Thanks a ton.

A: 

Unless you specify -P (prune empty directories) you should automatically get all empty directories.

Have you checked if you maybe have a .cvsrc file which specifies something like

co -P

It should be located in your $HOME directory

If that is not the case, the question is if your tag is set on the empty directoies? Did you have the empty directories checked out when you did the tag operation?
The tag operation only tags the stuff you have in your sandbox, to tag everything in the repository do an rtag instead.

Ulf Lindback
-P will only remove empty directories that had already been checked out previously (e.g. after all files have been cvs-removed from them) - not specifying -P will NOT check out empty directories.
Oliver Giesen
A: 

Hi

Thanks for the quick reply.

I will answer them one by one.

-1 There is nothing in .cvsrc related to -P option.

-2 I used both tag and rtag and did not check out anything before putting the tag. The output after new checkout was same in both the cases.

I was able to get the directories back by issuing "cvs update -d" command. Though I would still like it to work in a single command.

PS: The issue is only with the checkouts to a branch, if I use cvs co REPO, all the folders are available in that case.

foo
Strange, I just did a checkout of a branch and do indeed get the empty folders. They might have had content in them in previous releases though and I use cvsnt.
Ulf Lindback
+1  A: 

Directories are not versioned in any way in CVS. When you do a checkout using a branch tag in CVS it only checks out directories that have files matching the requested branch tag. Since the "obj" directories are all empty CVS doesn't know to check them out. When you run update it will "fix" the state of your working copy and get the empty directories.

John Meagher