Date: Sat, 2 May 1998 16:16:36 +0200 From: Eivind Eklund <eivind@yes.no> To: David Kelly <dkelly@HiWAAY.net>, hackers@FreeBSD.ORG Subject: Re: cvs woes Message-ID: <19980502161636.40296@follo.net> In-Reply-To: <199805020152.UAA24942@nospam.hiwaay.net>; from David Kelly on Fri, May 01, 1998 at 08:52:38PM -0500 References: <199805020152.UAA24942@nospam.hiwaay.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980502161636.40296>