From owner-freebsd-hackers Sat May 2 07:17:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA27161 for freebsd-hackers-outgoing; Sat, 2 May 1998 07:17:04 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA27153 for ; Sat, 2 May 1998 07:16:58 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id OAA24110; Sat, 2 May 1998 14:16:52 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id QAA08837; Sat, 2 May 1998 16:16:36 +0200 (MET DST) Message-ID: <19980502161636.40296@follo.net> Date: Sat, 2 May 1998 16:16:36 +0200 From: Eivind Eklund To: David Kelly , hackers@FreeBSD.ORG Subject: Re: cvs woes References: <199805020152.UAA24942@nospam.hiwaay.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199805020152.UAA24942@nospam.hiwaay.net>; from David Kelly on Fri, May 01, 1998 at 08:52:38PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, May 01, 1998 at 08:52:38PM -0500, David Kelly wrote: [... of directories CVS don't know about ...] > Have attempted removing the questioned directories. No more complaints > from cvs, but the directories are not restored after an update. > > I use cvsup to update my /home/ncvs. > > Short of "rm -rf /usr/{ports,src}" and starting over, how can I correct > this mess? (/usr/src is in the same state) The above is a result of CVS being 'somewhat less than graceful' about not having enough memory. When adding directories, it should really update CVS/Entries in a two-phase commit before actually extracting the directory. This would let it fail gracefully (ie, a new 'cvs update' would bring it to the correct state). Now, since it doesn't, you're more or less screwed. What you can do: Blow the unknown directories away and do a 'cvs update' (simplest). This should get you up to date correctly, unless you've got patches in the unknown directories. The below will probably get you up to date correctly no matter what, but involves 'more magic' and is only slightly tested (ie, I looked the output over without the shell pipe, but I didn't actually _run_ it :-) cvs update 2> /dev/null | perl -ne 'if (/^\? (.*)\/(.*)/ && -d "$1/CVS") {print "(cd $1 && echo \"D/$2////\" >> CVS/Entries)\n";} elsif(/^\? (.*)/ && -d "$1/CVS") {print "echo \"D/$1////\" >> CVS/Entries\n"};' | csh This run through the output of cvs, checks for any unknown directories which has a CVS subdir, and add those to CVS/Entries of the parent directory. You will have to run it several times if the subdirs of the newly added subdirs are missing their CVS/Entries entries, and it won't solve any piece where the CVS subdir of a subdir hasn't been created at all. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message