Date: Fri, 8 Nov 2002 13:07:24 +0200 (EET) From: Ruslan Ermilov <ru@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: gnu/45137: [PATCH] CVS 1.11.2 cannot reuse log messages Message-ID: <200211081107.gA8B7OvB057506@whale.sunbay.crimea.ua>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211081107.gA8B7OvB057506>
