From owner-freebsd-cvsweb@FreeBSD.ORG Tue Apr 20 07:38:08 2004 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 3890C16A4CE for ; Tue, 20 Apr 2004 07:38:08 -0700 (PDT) Received: from nosc.ja.net (nosc.ja.net [128.86.16.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 059D543D31 for ; Tue, 20 Apr 2004 07:38:08 -0700 (PDT) (envelope-from rhe@nosc.ja.net) Envelope-to: freebsd-cvsweb@freebsd.org Received: from rhe by nosc.ja.net with local (Exim 3.36 #53) id 1BFwNy-0002mu-00 for freebsd-cvsweb@freebsd.org; Tue, 20 Apr 2004 15:38:06 +0100 Date: Tue, 20 Apr 2004 15:38:06 +0100 From: Rob Evans To: freebsd-cvsweb@freebsd.org Message-ID: <20040420143806.GB13838@nosc.ja.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: Linking to latest revision of a file X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 14:38:08 -0000 Hi all, I fear this is an exceptionally dumb question, so dumb that even though I could not find the answer by looking through the list archives, it is because everybody else already knows it. If this is the case, then feel free to poke fun! (Within reason.) CVSweb is up and running, but what I would like to do is link to "the newest" revision of files from a separate HTML page. In other words, a link along the lines of the following (but which actually works): http:///cgi-bin/cvsweb.cgi/?rev=HEAD Any application of a clue-by-four gratefully received. Regards, Rob From owner-freebsd-cvsweb@FreeBSD.ORG Tue Apr 20 11:36:32 2004 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 BA82616A4CE for ; Tue, 20 Apr 2004 11:36:32 -0700 (PDT) Received: from smtp3.pp.htv.fi (smtp3.pp.htv.fi [213.243.153.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6061943D4C for ; Tue, 20 Apr 2004 11:36:32 -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 A129D27AEB2 for ; Tue, 20 Apr 2004 21:36:26 +0300 (EEST) Received: from [62.78.130.181] (cs78130181.pp.htv.fi [62.78.130.181]) /8.11.1) with ESMTP id i3KIaQh20825 for ; Tue, 20 Apr 2004 21:36:26 +0300 (EETDST) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: freebsd-cvsweb@FreeBSD.org In-Reply-To: <20040420143806.GB13838@nosc.ja.net> References: <20040420143806.GB13838@nosc.ja.net> Content-Type: text/plain Organization: FreeBSD Message-Id: <1082486185.5301.332.camel@bobcat.mine.nu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Tue, 20 Apr 2004 21:36:25 +0300 Content-Transfer-Encoding: 7bit Subject: Re: Linking to latest revision of a file X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 18:36:32 -0000 On Tue, 2004-04-20 at 17:38, Rob Evans wrote: > CVSweb is up and running, but what I would like to do is link to "the > newest" revision of files from a separate HTML page. In other words, a > link along the lines of the following (but which actually works): > > http:///cgi-bin/cvsweb.cgi/?rev=HEAD Hm, *that* should actually work. Ditto for "?rev=." It's a bug in CVSweb 3.0, but works in 2.0.x; will take a look. If you want to checkout the latest revision of a file (ie. not show the HTMLized source etc), this should work in all CVSweb versions: http:///cgi-bin/cvsweb.cgi/~checkout~/path/to/filename From owner-freebsd-cvsweb@FreeBSD.ORG Tue Apr 20 12:21:43 2004 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 E4B0E16A4D0 for ; Tue, 20 Apr 2004 12:21:43 -0700 (PDT) Received: from cmsrelay02.mx.net (cmsrelay02.mx.net [165.212.11.111]) by mx1.FreeBSD.org (Postfix) with SMTP id 8DB3243D5C for ; Tue, 20 Apr 2004 12:21:43 -0700 (PDT) (envelope-from noackjr@alumni.rice.edu) Received: from uadvg131.cms.usa.net (165.212.11.131) by cmsoutbound.mx.net with SMTP; 20 Apr 2004 19:21:39 -0000 Received: from optimator.noacks.org [66.140.17.8] by uadvg131.cms.usa.net (ASMTP/noackjr@usa.net) via mtad (C8.MAIN.3.13N) with ESMTP id 922iDTTVj0195M31; Tue, 20 Apr 2004 19:21:35 GMT X-USANET-Auth: 66.140.17.8 AUTH noackjr@usa.net optimator.noacks.org Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id DF831617D; Tue, 20 Apr 2004 14:21:34 -0500 (CDT) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25030-07; Tue, 20 Apr 2004 14:21:33 -0500 (CDT) Received: from alumni.rice.edu (optimator [192.168.1.11]) by optimator.noacks.org (Postfix) with ESMTP id 7C4486176; Tue, 20 Apr 2004 14:21:33 -0500 (CDT) Message-ID: <4085783D.9020005@alumni.rice.edu> Date: Tue, 20 Apr 2004 14:21:33 -0500 From: Jon Noack User-Agent: Mozilla Thunderbird 0.6a (Windows/20040419) X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ville_Skytt=E4?= References: <20040420143806.GB13838@nosc.ja.net> <1082486185.5301.332.camel@bobcat.mine.nu> In-Reply-To: <1082486185.5301.332.camel@bobcat.mine.nu> Content-Type: multipart/mixed; boundary="------------010608070407000000040404" X-Virus-Scanned: by amavisd-new at noacks.org cc: freebsd-cvsweb@FreeBSD.org Subject: Re: Linking to latest revision of a file X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 19:21:44 -0000 This is a multi-part message in MIME format. --------------010608070407000000040404 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable On 4/20/2004 1:36 PM, Ville Skytt=E4 wrote: > On Tue, 2004-04-20 at 17:38, Rob Evans wrote: >> CVSweb is up and running, but what I would like to do is link to >> "the newest" revision of files from a separate HTML page. In other >> words, a link along the lines of the following (but which actually >> works): >>=20 >> http:///cgi-bin/cvsweb.cgi/?rev=3DHEAD >=20 > Hm, *that* should actually work. Ditto for "?rev=3D." It's a bug in=20 > CVSweb 3.0, but works in 2.0.x; will take a look. Diff from slightly-modified 3.0.0 attached (might be a little fuzz, but=20 hopefully it will still apply cleanly). I took the easy way out and=20 just made it a separate if. Note that this is a definite hack and that=20 I didn't really bother understanding everything -- it Just Works(tm)... Either '?rev=3DHEAD' or '?rev=3D.' should work. Jon Noack --------------010608070407000000040404 Content-Type: text/plain; name="cvsweb.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cvsweb.diff" --- cvsweb.cgi.bak Fri Feb 27 11:10:17 2004 +++ cvsweb.cgi Tue Apr 20 14:12:21 2004 @@ -416,9 +416,13 @@ next; } my ($rev, $tag) = split(/:/, $t, 2); - ($input{$p}) = ($rev =~ /^(\d+(?:\.\d+)+)$/) - or fatal('500 Internal Error', - 'Invalid revision: %s=%s', $p, $t); + if ($rev eq 'HEAD' || $rev eq '.') { + $input{$p} = $rev; + } else { + ($input{$p}) = ($rev =~ /^(\d+(?:\.\d+)+)$/) + or fatal('500 Internal Error', + 'Invalid revision: %s=%s', $p, $t); + } if (defined($tag)) { ($tag) = ($tag =~ VALID_TAG1) or fatal('500 Internal Error', --------------010608070407000000040404-- From owner-freebsd-cvsweb@FreeBSD.ORG Tue Apr 20 12:34:21 2004 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 0FB3D16A4CE for ; Tue, 20 Apr 2004 12:34:20 -0700 (PDT) Received: from smtp1.pp.htv.fi (smtp1.pp.htv.fi [212.90.64.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C41D43D5E for ; Tue, 20 Apr 2004 12:34:20 -0700 (PDT) (envelope-from scop@FreeBSD.org) Received: from posti.pp.htv.fi (posti.pp.htv.fi [212.90.64.50]) by smtp1.pp.htv.fi (Postfix) with ESMTP id 3F5D2802BA; Tue, 20 Apr 2004 22:34:19 +0300 (EEST) Received: from [62.78.130.181] (cs78130181.pp.htv.fi [62.78.130.181]) /8.11.1) with ESMTP id i3KJYIh15539; Tue, 20 Apr 2004 22:34:18 +0300 (EETDST) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: noackjr@alumni.rice.edu In-Reply-To: <4085783D.9020005@alumni.rice.edu> References: <20040420143806.GB13838@nosc.ja.net> <1082486185.5301.332.camel@bobcat.mine.nu> <4085783D.9020005@alumni.rice.edu> Content-Type: text/plain Organization: FreeBSD Message-Id: <1082489657.5301.341.camel@bobcat.mine.nu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Tue, 20 Apr 2004 22:34:18 +0300 Content-Transfer-Encoding: 7bit cc: freebsd-cvsweb@FreeBSD.org Subject: Re: Linking to latest revision of a file X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 19:34:21 -0000 On Tue, 2004-04-20 at 22:21, Jon Noack wrote: > Diff from slightly-modified 3.0.0 attached (might be a little fuzz, but > hopefully it will still apply cleanly). I took the easy way out and > just made it a separate if. So did I, before seeing this mail... duh, fixed in CVS. Thanks anyway ;)