From owner-freebsd-bugs Fri Jul 5 8:20:16 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCB5437B400 for ; Fri, 5 Jul 2002 08:20:07 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2ED1E43E3B for ; Fri, 5 Jul 2002 08:20:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g65FK7JU039042 for ; Fri, 5 Jul 2002 08:20:07 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g65FK7ra039041; Fri, 5 Jul 2002 08:20:07 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBCFA37B400 for ; Fri, 5 Jul 2002 08:12:51 -0700 (PDT) Received: from nectar.attlabs.att.com (AMontsouris-108-1-16-250.abo.wanadoo.fr [80.15.145.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id D276C43E3B for ; Fri, 5 Jul 2002 08:12:49 -0700 (PDT) (envelope-from fenner@research.att.com) Received: from nectar.attlabs.att.com (localhost [IPv6:::1]) by nectar.attlabs.att.com (8.12.3/8.11.6) with ESMTP id g65FCgWH013448 for ; Fri, 5 Jul 2002 17:12:43 +0200 (CEST) (envelope-from fenner@nectar.attlabs.att.com) Received: (from fenner@localhost) by nectar.attlabs.att.com (8.12.3/8.12.3/Submit) id g65FCe5O013447; Fri, 5 Jul 2002 17:12:40 +0200 (CEST) Message-Id: <200207051512.g65FCe5O013447@nectar.attlabs.att.com> Date: Fri, 5 Jul 2002 17:12:40 +0200 (CEST) From: Bill Fenner Reply-To: Bill Fenner To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/40227: CVS client doesn't upload new files created by "cvs update -j" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 40227 >Category: bin >Synopsis: CVS client doesn't upload new files created by "cvs update -j" >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 05 08:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Bill Fenner >Release: FreeBSD 4.6-STABLE i386 >Organization: AT&T Labs - Research >Environment: System: FreeBSD nectar.attlabs.att.com 4.6-STABLE FreeBSD 4.6-STABLE #0: Sat Jun 22 11:58:01 PDT 2002 root@nectar.attlabs.att.com:/usr/obj/usr/src/sys/GENERIC i386 Concurrent Versions System (CVS) 1.11.1p1-FreeBSD (client/server) Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, Jeff Polk, and other authors CVS may be copied only under the terms of the GNU General Public License, a copy of which can be found with the CVS distribution kit. Specify the --help option for further information about CVS >Description: I was updating contrib software via my normal steps: 1. cvs co -rRELENG_4 foo 2. cvs update -jr1 -jr2 foo 3. 4. 5. fcvs commit foo When I did this with tcpdump, I got weird cvs server errors for each new file that "cvs update" created: Checking in contrib_tcpdump/ieee802_11.h; /home/ncvs/src/contrib/tcpdump/ieee802_11.h,v <-- ieee802_11.h cvs server: ieee802_11.h: No such file or directory cvs [server aborted]: error diffing ieee802_11.h cvs commit: saving log message in /tmp/cvsed1Xq0 I went through this painful process for each new file in the tcpdump import, and got really frustrated - frustrated enough to dive into the CVS code. Luckily, I had another MFC to do - libpcap. I watched the CVS client/server communication and saw that CVS thought that the new files were unmodified so didn't need to be uploaded, even though they were also new. This is a bug in "cvs update" -- if it creates a new file, it should not put the timestamp in. It can be worked around in the cvs client code - it should upload all new files, even if the timestamp on them is the same. >How-To-Repeat: Use cvs update -jfoo -jbar in a way that creates a new file on a branch. Commit using remote CVS. >Fix: This is the cvs client workaround. Index: client.c =================================================================== RCS file: /home/ncvs/src/contrib/cvs/src/client.c,v retrieving revision 1.2.2.3 diff -u -r1.2.2.3 client.c --- client.c 28 Oct 2001 21:32:07 -0000 1.2.2.3 +++ client.c 5 Jul 2002 14:37:41 -0000 @@ -5226,7 +5226,8 @@ } else if (vers->ts_rcs == NULL || args->force - || strcmp (vers->ts_user, vers->ts_rcs) != 0) + || strcmp (vers->ts_user, vers->ts_rcs) != 0 + || (vers->vn_user && *vers->vn_user == '0')) { if (args->no_contents && supported_request ("Is-modified")) I haven't looked at the merge code to see if it would be easy to do the fix there (too|instead). >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message