From owner-freebsd-bugs Fri Nov 8 3:10: 5 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 706BA37B401; Fri, 8 Nov 2002 03:10:03 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B10B843E75; Fri, 8 Nov 2002 03:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id gA8BA2x3017022; Fri, 8 Nov 2002 03:10:02 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id gA8BA2Rr017021; Fri, 8 Nov 2002 03:10:02 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1635A37B401 for ; Fri, 8 Nov 2002 03:07:36 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68F0643E6E for ; Fri, 8 Nov 2002 03:07:32 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with ESMTP id gA8B7RMZ057507 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 8 Nov 2002 13:07:27 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Submit) id gA8B7OvB057506; Fri, 8 Nov 2002 13:07:24 +0200 (EET) Message-Id: <200211081107.gA8B7OvB057506@whale.sunbay.crimea.ua> Date: Fri, 8 Nov 2002 13:07:24 +0200 (EET) From: Ruslan Ermilov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 X-GNATS-Notify: ru Subject: gnu/45137: [PATCH] CVS 1.11.2 cannot reuse log messages 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: 45137 >Category: gnu >Synopsis: [PATCH] CVS 1.11.2 cannot reuse log messages >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Nov 08 03:10:02 PST 2002 >Closed-Date: >Last-Modified: >Originator: Ruslan Ermilov >Release: FreeBSD 4.7-STABLE i386 >Organization: Sunbay Software Ltd >Environment: System: FreeBSD whale.sunbay.crimea.ua 4.7-STABLE FreeBSD 4.7-STABLE #0: Sat Nov 2 10:42:34 EET 2002 ru@whale.sunbay.crimea.ua:/usr/obj/usr/src/sys/WHALE i386 >Description: CVS 1.11.2 has a bug which prevents it from reusing the log messages when operating in local mode. (Not applicable to "pserver" mode.) >How-To-Repeat: Add or modify files in two different checked-out directories. Run ``cvs commit''. Enter the log messages. When prompted to enter the log for the second file, leave it unchanged. When prompted what to do, choose ``continue''. Watch the second file gets an empty (null) log. >Fix: Fixed in CVS repo on cvs.cvshome.org. ("emply" below should be spelled "empty".) Index: logmsg.c =================================================================== RCS file: /cvs/ccvs/src/logmsg.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -p -u -r1.61 -r1.62 --- logmsg.c 7 May 2002 20:48:21 -0000 1.61 +++ logmsg.c 29 Aug 2002 05:00:59 -0000 1.62 @@ -354,16 +354,16 @@ do_editor (dir, messagep, repository, ch if (fclose (fp) < 0) error (0, errno, "warning: cannot close %s", fname); - if (pre_stbuf.st_mtime == post_stbuf.st_mtime || - *messagep == NULL || - (*messagep)[0] == '\0' || - strcmp (*messagep, "\n") == 0) + /* canonicalize emply messages */ + if (*messagep != NULL && + (**messagep == '\0' || strcmp (*messagep, "\n") == 0)) + { + free (*messagep); + *messagep = NULL; + } + + if (pre_stbuf.st_mtime == post_stbuf.st_mtime || *messagep == NULL) { - if (*messagep) - { - free (*messagep); - *messagep = NULL; - } for (;;) { (void) printf ("\nLog message unchanged or not specified\n"); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message