Date: Thu, 25 Mar 1999 13:41:52 -0800 (PST) From: Archie Cobbs <archie@whistle.com> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/10793: cvs update modification time check granularity is 1 second Message-ID: <199903252141.NAA71438@bubba.whistle.com>
next in thread | raw e-mail | index | archive | help
>Number: 10793 >Category: bin >Synopsis: cvs update modification time check granularity is 1 second >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 25 13:50:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Archie Cobbs >Release: FreeBSD 3.1-STABLE i386 >Organization: Whistle Communications, Inc. >Environment: FreeBSD 3.1-stable, probably -current too >Description: When you type "cvs update" cvs uses the timestamp recorded in the Entries file to optimize the determination of whether a file has been modified or not. However, the granularity of this check is only one second, so if a file is checked out and modified within the same second, cvs will mistakenly report the file as unmodified (and so will "cvs diff"), possibly causing a wrong revision of the file to be checked in later. Yes, this actually happened to me.. what I did was something like this: $ rm file.c $ cvs update file.c ; patch < patchfile ; rm file.c.orig After doing this "cvs update" reported no modifications, even though "file.c" had been patched. >How-To-Repeat: $ rm file.c $ cvs update file.c ; patch < patchfile ; rm file.c.orig $ cvs update >Fix: The timestamp recorded in the Entries files should include the microseconds field obtained from stat(2). This could be done in a backward-compatible manner. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903252141.NAA71438>