From owner-freebsd-cvsweb@FreeBSD.ORG Mon Oct 20 08:01:28 2003 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE61916A4BF for ; Mon, 20 Oct 2003 08:01:28 -0700 (PDT) Received: from hotmail.com (bay10-dav42.bay10.hotmail.com [64.4.37.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EA8043FDF for ; Mon, 20 Oct 2003 08:01:28 -0700 (PDT) (envelope-from dcoshea@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 20 Oct 2003 08:01:28 -0700 Received: from 203.12.97.91 by bay10-dav42.bay10.hotmail.com with DAV; Mon, 20 Oct 2003 15:01:28 +0000 X-Originating-IP: [203.12.97.91] X-Originating-Email: [dcoshea@hotmail.com] From: "David O'Shea" To: Date: Tue, 21 Oct 2003 01:01:27 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: X-OriginalArrivalTime: 20 Oct 2003 15:01:28.0124 (UTC) FILETIME=[09D2FFC0:01C3971B] Subject: Re: Bug accessing file whose path starts with a dot X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list [restricted posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2003 15:01:29 -0000 Hi all, cvsweb 2.0.6 running under Win32 Apache 2.0.44 and Cygwin Perl 5.8.0 (but I don't think those details are relevant) is failing to display a file whose path starts with a '.'. When I select the relevant CVS Root and then in the table click on the directory starting with a '.' ('.profile.d/'), then select a file ('lynx.cfg') and click on the version ('1.1.1.1') I get: >>> Error: Unexpected output from cvs co: =================================================================== Checking out .profile.d/lynx.cfg RCS: /home/doshea/profile-repository/.profile.d/lynx.cfg,v VERS: 1.1.1.1 <<< The issue is that cvsweb seems to be trying to strip off any leading './', './/', './//', etc. from the filename shown after 'Checking out' but it also strips a '.' by itself. Here's my patch which also improves the error message (which helped me to figure out the problem): >>> --- cvsweb.cgi 2002-09-27 06:56:06.000000000 +1000 +++ /usr/Apache/Apache2/cgi-bin/cvsweb.cgi 2003-09-11 20:01:06.000000000 +1000 @@ -1861,15 +1862,15 @@ if (/^Checking out (.*)$/) { $filename = $1; - $filename =~ s/^\.\/*//; + $filename =~ s/^\.\/+//; } $cvsheader .= $_; } if ($filename ne $where) { fatal("500 Internal Error", - 'Unexpected output from cvs co: %s', - $cvsheader); + 'Unexpected output from cvs co: %s (output says "%s" but expected "%s")', + $cvsheader, $filename, $where); } $| = 1; <<< I changed the regexp to match a '.' followed by one or more '/', instead of zero or more '/' as it was previously. Thanks, David From owner-freebsd-cvsweb@FreeBSD.ORG Sat Oct 25 05:18:39 2003 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A8E3216A4BF for ; Sat, 25 Oct 2003 05:18:39 -0700 (PDT) Received: from smtp3.pp.htv.fi (smtp3.pp.htv.fi [213.243.153.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id E29A043FBD for ; Sat, 25 Oct 2003 05:18:38 -0700 (PDT) (envelope-from scop@FreeBSD.org) Received: from posti.pp.htv.fi (posti.pp.htv.fi [212.90.64.50]) by smtp3.pp.htv.fi (Postfix) with ESMTP id C11F327B190 for ; Sat, 25 Oct 2003 15:18:37 +0300 (EEST) Received: from cs78134079.pp.htv.fi (cs78134079.pp.htv.fi [62.78.134.79]) /8.11.1) with ESMTP id h9PCIbc09885 for ; Sat, 25 Oct 2003 15:18:37 +0300 (EETDST) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: freebsd-cvsweb@FreeBSD.org In-Reply-To: References: Content-Type: text/plain Organization: FreeBSD Message-Id: <1067084315.1704.122.camel@bobcat.mine.nu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sat, 25 Oct 2003 15:18:36 +0300 Content-Transfer-Encoding: 7bit Subject: Re: Bug accessing file whose path starts with a dot X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list [restricted posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2003 12:18:39 -0000 On Mon, 2003-10-20 at 18:01, David O'Shea wrote: > cvsweb 2.0.6 running under Win32 Apache 2.0.44 and Cygwin Perl 5.8.0 > (but I don't think those details are relevant) is failing to display a > file whose path starts with a '.'. Thanks for the patch! I applied a slightly modified version to the development branch: http://www.freebsd.org/cgi/cvsweb.cgi/projects/cvsweb/cvsweb.cgi.diff?r1=1.213&r2=1.214 By the way, do you need to apply any other patches to get cvsweb to run under Win32/Cygwin or does it work out-of-the-box?