Date: Fri, 5 Jul 2002 17:12:40 +0200 (CEST) From: Bill Fenner <fenner@research.att.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/40227: CVS client doesn't upload new files created by "cvs update -j" Message-ID: <200207051512.g65FCe5O013447@nectar.attlabs.att.com>
next in thread | raw e-mail | index | archive | help
>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. <fix conflicts>
4. <build and test>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207051512.g65FCe5O013447>
