From fanf@dotat.at  Fri Sep  1 14:04:31 2000
Return-Path: <fanf@dotat.at>
Received: from hand.dotat.at (dhcp.207.44.198.57.salon.com [207.44.198.57])
	by hub.freebsd.org (Postfix) with ESMTP id DD9D437B423
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  1 Sep 2000 14:04:28 -0700 (PDT)
Received: from fanf by hand.dotat.at with local (Exim 3.15 #3)
	id 13Uxz2-0000rf-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 01 Sep 2000 21:04:20 +0000
Message-Id: <E13Uxz2-0000rf-00@hand.dotat.at>
Date: Fri, 01 Sep 2000 21:04:20 +0000
From: Tony Finch <dot@dotat.at>
Sender: fanf@dotat.at
Reply-To: Tony Finch <dot@dotat.at>
To: FreeBSD-gnats-submit@freebsd.org
Subject: http://www.freebsd.org/cgi/cvsweb.cgi annotate omits newlines
X-Send-Pr-Version: 3.2

>Number:         20989
>Category:       misc
>Synopsis:       http://www.freebsd.org/cgi/cvsweb.cgi annotate omits newlines
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    knu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 01 14:10:01 PDT 2000
>Closed-Date:    Tue Sep 5 01:08:33 JST 2000
>Last-Modified:  Tue Sep 05 01:09:02 JST 2000
>Originator:     Tony Finch <dot@dotat.at>
>Release:        FreeBSD 4.1-STABLE-20000831 i386
>Organization:
dotat
>Environment:

http://www.freebsd.org/

>Description:

When viewing a file with cvsweb in annotate mode, newlines are missed
out after empty lines and lines with trailing whitespace causing lines
to be concatenated.

>How-To-Repeat:

http://www.freebsd.org/cgi/cvsweb.cgi/www/en/cgi/cvsweb.cgi?annotate=1.48

The end of the initial copyright comment is displayed as

1.46          knu         48: ###
                          49:                          50: use strict;
1.21          wosch       51:1.46          knu         52: use vars qw (
                          53:     $config $allow_version_select $verbose

when it should be

1.46          knu         48: ###
                          49:
                          50: use strict;
1.21          wosch       51:
1.46          knu         52: use vars qw (
                          53:     $config $allow_version_select $verbose

and there are loads of similar problems in the rest of the file.

>Fix:

Index: cvsweb.cgi
===================================================================
RCS file: /FreeBSD/cvs/www/en/cgi/cvsweb.cgi,v
retrieving revision 1.48
diff -u -r1.48 cvsweb.cgi
--- cvsweb.cgi	2000/08/25 09:21:00	1.48
+++ cvsweb.cgi	2000/09/01 20:55:30
@@ -919,7 +919,7 @@
 	local $_ = $_[0];
 
 	# Cut trailing spaces
-	s/\s+\n$//;
+	s/\s+$//;
 
 	# Expand tabs
 	s/\t+/' ' x (length($&) * $tabstop - length($`) % $tabstop)/e

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->knu 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Mon Sep 4 07:03:36 PDT 2000 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20989 
State-Changed-From-To: open->closed 
State-Changed-By: knu 
State-Changed-When: Tue Sep 5 01:08:33 JST 2000 
State-Changed-Why:  
Fixed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20989 
>Unformatted:
