From owner-freebsd-hackers Wed Aug 9 11:37:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 9CFA437C0D8 for ; Wed, 9 Aug 2000 11:37:11 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.3) id LAA33249; Wed, 9 Aug 2000 11:36:39 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200008091836.LAA33249@bubba.whistle.com> Subject: Re: CVS question In-Reply-To: <200008091554.IAA53597@vashon.polstra.com> from John Polstra at "Aug 9, 2000 08:54:58 am" To: John Polstra Date: Wed, 9 Aug 2000 11:36:39 -0700 (PDT) Cc: hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG John Polstra writes: > > $ cvs co -D 'January 18, 1999 0:00' freebsd/src/usr.sbin/xntpd/lib/ranny.c > > > > Perhaps version 1.1.1.2 would be correct, but instead you get 1.1. > > CVS has a heuristic that does the wrong thing for this particular > file. The code is around line 3252 of src/contrib/cvs/src/rcs.c in > the function RCS_getdate(): > > if (! STREQ (cur_rev, "1.1")) > return (xstrdup (cur_rev)); > > /* This is 1.1; if the date of 1.1 is not the same as that for the > 1.1.1.1 version, then return 1.1. This happens when the first > version of a file is created by a regular cvs add and commit, > and there is a subsequent cvs import of the same file. */ > p = findnode (rcs->versions, "1.1.1.1"); > if (p) > { > vers = (RCSVers *) p->data; > if (RCS_datecmp (vers->date, date) != 0) > return xstrdup ("1.1"); > } > > It compares the dates on the theory that an import will set > identical dates in revisions 1.1 and 1.1.1.1. But in the file you > mentioned, they are off by 1 second. So CVS doesn't recognize it as > an import. > > revision 1.1 > date: 1993/12/21 18:36:22; author: wollman; state: Exp; > > revision 1.1.1.1 > date: 1993/12/21 18:36:23; author: wollman; state: Exp; lines: +0 -0 > > Probably the import straddled the seconds boundary. I hope current > versions of CVS force the dates to be the same on an import. I > haven't checked to see whether that's the case or not. Hmm.. sounds like we should do one or both of these things.. 1/ Fix the bug in CVS that caused the import to set two different dates 2/ Modify this cvs file to set the dates to be the same What do you think? -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message