bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS: Why does -r imply -P?


From: Peter Smith
Subject: CVS: Why does -r imply -P?
Date: Sun, 16 Sep 2001 14:51:00 -0700 (PDT)

Hi folks,
        I'm a moderately experienced CVS user/administrator, but a
non-experienced CVS hacker (until this weekend). I believe I've managed to
track down a bug in CVS, and I have a fix for it, but I'm not clear on
whether the fix will impact other functions of CVS. I've also searched
through the FAQs and buglists etc and haven't found reference to this bug
anywhere else.
        The problem is that a number of our developers are seeing the
error "move away XXXX; it is in the way", and it doesn't seem to be a
justified error. It is only happening when we checkout overlapping modules
(i.e. two or more modules that have some number of common directories).
We also noticed that it only happens with pserver, and on branches (where
-r is set). 
        After gdb'ing cvs for a day, this is what I found. When -r is
passed to checkout() (in checkout.c), it sets "checkout_prune_dirs = 1"
(implies -P). This will then cause the server's cached copy of the tree
(in /tmp/cvs-*) to have it's empty directories removed as the checkout 
progresses (and all of them are empty, as would be expected). 
        When it comes to visit the second module, it reaches those
overlapping directories and find they aren't there anymore in the
server's cached tree (they were pruned). It then creates the directories,
and admin files, but CVS/Entries is empty because it hasn't been filled up
with useful data. This causes the server to believe that the client
doesn't have those files yet, so orders a fresh checkout. Since they
really are on the client already, the client thinks that the existing copy
is in the way, and hence the error message.
        It seems to me that the best solution is to remove the
"checkout_prune_dirs = 1" line, at least when run on the server. However,
I'm not clear of the implication of removing that assignment. In reality,
it only seems to have an effect if you use the non-server (in our case,
NFS) check out method, and even then, it only has an effect if you're
checking out from a branch (not the mainline).
        Also, I look into the ccvs repository, this "checkout_prune_dir =
1" line dates back to 1994, and much of the server.c code was written
after that date. It suggests to me that this line was never intended to be
used for a client-server system.
        I'll probably make the change in our local cvs installation, but
if there's no good reason for -r to imply -P, then perhaps it could be
changed in the cvs distribution? On the other hand, I'd hate to remove it
if it'll cause other problems later on.

Thanks for any thoughts on this,

Peter Smith.
Development Support Manager,
Redback Networks.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]