From owner-freebsd-cvsweb@FreeBSD.ORG Tue Dec 27 19:40:47 2005 Return-Path: X-Original-To: freebsd-cvsweb@freebsd.org 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 AB19916A41F for ; Tue, 27 Dec 2005 19:40:47 +0000 (GMT) (envelope-from daniel.leidert.spam@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id 188BF43D64 for ; Tue, 27 Dec 2005 19:40:44 +0000 (GMT) (envelope-from daniel.leidert.spam@gmx.net) Received: (qmail invoked by alias); 27 Dec 2005 19:40:42 -0000 Received: from unknown (EHLO test.wgdd.de) [195.227.105.180] by mail.gmx.net (mp035) with SMTP; 27 Dec 2005 20:40:42 +0100 X-Authenticated: #17381962 Received: from localhost ([127.0.0.1] ident=dl) by test.wgdd.de with esmtp (Exim 3.36 #1 (Debian)) id 1ErKgX-0008VO-00 for ; Tue, 27 Dec 2005 20:40:37 +0100 From: Daniel Leidert To: ml_cvsweb Content-Type: text/plain Organization: TU Dresden Date: Tue, 27 Dec 2005 20:40:36 +0100 Message-Id: <1135712437.32456.9.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Usage question (automatically get the current project-root) X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2005 19:40:47 -0000 Hello, I have a question, I hope someone can answer. In my case, cvsweb can show two project-roots. This means, in cvsweb.conf, I have something like this: @CVSrepositories = ( 'project1' => ['project1', '/var/lib/cvs/cvs/project1'], 'project2' => ['project2', '/var/lib/cvs/cvs/project2'], ); Now I wrote some checkout infos in $long_intro: [..] cvs -z3 -d:pserver:anonymous\@cvs.foo.bar:/cvs/project-root co module where project-root is one of the projects you see listed in the pull-down menu below. [..] Now I would like to have the possibility to automatically write the correct current project-root where the user is - instead of writing the general "project-root" phrase with the explanation, what this phrase is. So if the user is looking at project1, the output of $long_intro should automatically be: [..] cvs -z3 -d:pserver:anonymous\@cvs.foo.bar:/cvs/project1 co module [..] The ideal case would be to be able to do the same for $short_intro, but there also with the possibility to automatically write the right module-name. Any ideas, how or if this could be realized? (I hope, you understand the sense of this request.) Regards, Daniel From owner-freebsd-cvsweb@FreeBSD.ORG Tue Dec 27 20:49:15 2005 Return-Path: X-Original-To: freebsd-cvsweb@freebsd.org 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 2DF9F16A41F for ; Tue, 27 Dec 2005 20:49:15 +0000 (GMT) (envelope-from scop@freebsd.org) Received: from smtp1.pp.htv.fi (smtp1.pp.htv.fi [213.243.153.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA79843D5C for ; Tue, 27 Dec 2005 20:49:14 +0000 (GMT) (envelope-from scop@freebsd.org) Received: from [192.168.2.4] (cs181056070.pp.htv.fi [82.181.56.70]) by smtp1.pp.htv.fi (Postfix) with ESMTP id 2EA967FCA8 for ; Tue, 27 Dec 2005 22:49:12 +0200 (EET) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: ml_cvsweb In-Reply-To: <1135712437.32456.9.camel@localhost> References: <1135712437.32456.9.camel@localhost> Content-Type: text/plain Organization: FreeBSD Date: Tue, 27 Dec 2005 22:49:12 +0200 Message-Id: <1135716552.13113.14.camel@bobcat.mine.nu> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 7bit Subject: Re: Usage question (automatically get the current project-root) X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2005 20:49:15 -0000 On Tue, 2005-12-27 at 20:40 +0100, Daniel Leidert wrote: > I have a question, I hope someone can answer. In my case, cvsweb can > show two project-roots. This means, in cvsweb.conf, I have something > like this: > > @CVSrepositories = ( > 'project1' => ['project1', '/var/lib/cvs/cvs/project1'], > 'project2' => ['project2', '/var/lib/cvs/cvs/project2'], > ); [...] > Now I would like to have the possibility to automatically write the > correct current project-root where the user is - instead of writing the > general "project-root" phrase with the explanation, what this phrase is. > So if the user is looking at project1, the output of $long_intro should > automatically be: [...] > Any ideas, how or if this could be realized? (I hope, you understand the > sense of this request.) Yep, take a look at the cvsweb.conf-*bsd files shipped in the cvsweb tarball, and the "per-cvsroot configuration" commentary in cvsweb.conf above @CVSrepositories. So if your @CVSrepositories are as in the above, create a new file called cvsweb.conf-project1 to the same dir as the main cvsweb.conf and add project1 specific $long_intro and whatever you like there etc (and remember to end the file with "1;"), ditto for project2 -> cvsweb.conf-project2. Of course, there's more than one way to do it (cvsweb.conf is Perl code anyway), but I think the per-cvsroot config snippets are a good way to accomplish what you're looking for. From owner-freebsd-cvsweb@FreeBSD.ORG Tue Dec 27 23:48:32 2005 Return-Path: X-Original-To: freebsd-cvsweb@freebsd.org 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 906CF16A41F for ; Tue, 27 Dec 2005 23:48:32 +0000 (GMT) (envelope-from daniel.leidert.spam@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.21]) by mx1.FreeBSD.org (Postfix) with SMTP id C329F43D92 for ; Tue, 27 Dec 2005 23:48:19 +0000 (GMT) (envelope-from daniel.leidert.spam@gmx.net) Received: (qmail invoked by alias); 27 Dec 2005 23:48:18 -0000 Received: from unknown (EHLO test.wgdd.de) [195.227.105.180] by mail.gmx.net (mp033) with SMTP; 28 Dec 2005 00:48:18 +0100 X-Authenticated: #17381962 Received: from localhost ([127.0.0.1] ident=dl) by test.wgdd.de with esmtp (Exim 3.36 #1 (Debian)) id 1ErOYD-0001Tp-00 for ; Wed, 28 Dec 2005 00:48:17 +0100 From: Daniel Leidert To: freebsd-cvsweb@freebsd.org In-Reply-To: <1135716552.13113.14.camel@bobcat.mine.nu> References: <1135712437.32456.9.camel@localhost> <1135716552.13113.14.camel@bobcat.mine.nu> Content-Type: text/plain; charset=ISO-8859-1 Organization: TU Dresden Date: Wed, 28 Dec 2005 00:48:17 +0100 Message-Id: <1135727297.4931.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: quoted-printable X-Y-GMX-Trusted: 0 Subject: Re: Usage question (automatically get the current project-root) X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2005 23:48:32 -0000 Am Dienstag, den 27.12.2005, 22:49 +0200 schrieb Ville Skytt=E4: > On Tue, 2005-12-27 at 20:40 +0100, Daniel Leidert wrote: >=20 > > I have a question, I hope someone can answer. In my case, cvsweb can > > show two project-roots. This means, in cvsweb.conf, I have something > > like this: > >=20 > > @CVSrepositories =3D ( > > 'project1' =3D> ['project1', '/var/lib/cvs/cvs/project1'], > > 'project2' =3D> ['project2', '/var/lib/cvs/cvs/project2'], > > ); > [...] > > Now I would like to have the possibility to automatically write the > > correct current project-root where the user is - instead of writing the > > general "project-root" phrase with the explanation, what this phrase is= . > > So if the user is looking at project1, the output of $long_intro should > > automatically be: > [...] > > Any ideas, how or if this could be realized? (I hope, you understand th= e > > sense of this request.) >=20 > Yep, take a look at the cvsweb.conf-*bsd files shipped in the cvsweb > tarball, and the "per-cvsroot configuration" commentary in cvsweb.conf > above @CVSrepositories. >=20 > So if your @CVSrepositories are as in the above, create a new file > called cvsweb.conf-project1 to the same dir as the main cvsweb.conf and > add project1 specific $long_intro and whatever you like there etc (and > remember to end the file with "1;"), ditto for project2 -> > cvsweb.conf-project2. Thanks for pointing me into the right direction. The per-cvsroot configuration files work. > Of course, there's more than one way to do it (cvsweb.conf is Perl code > anyway), True, ... > but I think the per-cvsroot config snippets are a good way to > accomplish what you're looking for. ... right. Thanks. Regards, Daniel