Bug 64182

Summary: Leading newlines compound when reusing log messages
Product: [Retired] Red Hat Linux Reporter: Need Real Name <fdjsouthey>
Component: cvsAssignee: Martin Stransky <stransky>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-09 11:35:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch against cvs-1.11.1p1-7 none

Description Need Real Name 2002-04-28 04:36:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417

Description of problem:
The leading newline that now appears when editing log messages builds up if one
"reuses" the log message for successive commits.  



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
If you commit changes in multiple directories, and want to use the same
description for them all, you type in the first log and then for each new log,
you simply exit and accept that.  This used to be fine but the newlines pile up
making tons of whitespace in the logs or forcing people to delete the excess
newlines.

Actual Results:  Accumulates newlines.

Expected Results:  Should leave message intact.

Additional info:

I would suggest either reverting to the old behaviour (not sure what we gained
with this newline), or checking to see whether the log is being reused before
including it.

The following is an excerpt from the changelog of the cvs RPM that shows when
the change was introduced.  

* Tue Jul 31 2001 Bernhard Rosenkraenzer <bero> 1.11.1p1-3

- Fix up initial cvs login (#47457)
- Bring back the leading newline at the beginning of commit messages
  "a" is one key less than "O". ;)
- Fix build in the current build system

Comment 1 Douglas K. Fischer 2002-11-14 19:00:13 UTC
Created attachment 85104 [details]
Patch against cvs-1.11.1p1-7

Comment 2 Douglas K. Fischer 2002-11-14 19:06:54 UTC
The leading newline inserted at the beginning of a log message was deprecated by the 
CVS team in 1.11.1. The Red Hat patch cvs-1.11.1p1-cvspass.patch applied to cvs-
1.11.1p1-3 incorrectly addressed this problem by prepending a newline to the first line of 
the standard log message template. The results is that a newline is added ahead of the 
standard template each time a log message is reused as part of a recursive commit.

The attached patch cvs-1.11.1p1-logmsg.patch remedies this by backing out the change 
to logmsg.c performed in cvs-1.11.1p1-cvspass.patch and correctly applies the leading 
newline (only when no log message already exists).