From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22080 invoked from network); 24 Sep 2008 08:47:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Sep 2008 08:47:03 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 18080 invoked from network); 24 Sep 2008 08:46:47 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Sep 2008 08:46:47 -0000 Received: (qmail 18611 invoked by alias); 24 Sep 2008 08:46:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25738 Received: (qmail 18594 invoked from network); 24 Sep 2008 08:46:37 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 24 Sep 2008 08:46:37 -0000 Received: from cluster-d.mailcontrol.com (cluster-d.mailcontrol.com [217.69.20.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 94F6480307AB for ; Wed, 24 Sep 2008 10:46:34 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly08d.srv.mailcontrol.com (MailControl) with ESMTP id m8O8kN42015102 for ; Wed, 24 Sep 2008 09:46:33 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Wed, 24 Sep 2008 09:46:22 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id m8O8kHlI024762 for ; Wed, 24 Sep 2008 09:46:17 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id m8O8kHmh024759 for ; Wed, 24 Sep 2008 09:46:17 +0100 Message-Id: <200809240846.m8O8kHmh024759@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: Zsh hackers list Subject: Re: Minor VCS Info things In-reply-to: <20080923191520.GA65214@redoubt.spodhuis.org> References: <15055.1222092662@csr.com> <20080923170245.4da323c0@news01> <20080923191520.GA65214@redoubt.spodhuis.org> Comments: In-reply-to Phil Pennock message dated "Tue, 23 Sep 2008 12:15:21 -0700." Date: Wed, 24 Sep 2008 09:46:17 +0100 From: Peter Stephenson X-OriginalArrivalTime: 24 Sep 2008 08:46:22.0784 (UTC) FILETIME=[05906400:01C91E22] X-Scanned-By: MailControl A-08-50-15 (www.mailcontrol.com) on 10.68.0.118 X-Virus-Scanned: ClamAV 0.92.1/8322/Wed Sep 24 08:50:41 2008 on bifrost X-Virus-Status: Clean Phil Pennock wrote: > On 2008-09-23 at 17:02 +0100, Peter Stephenson wrote: > > I've done this. It seems to work OK. > > As a side note: there's a scenario I have at $work where use-server > won't work but the simple case will: multiple P4 servers and the file > named by $P4CONFIG, in the root directory of the client, setting P4PORT > to the correct server. I don't see why this shouldn't work. The only access to the server from the functions is via standard Perforce commands, which will search for $P4CONFIG. That's why I used "p4 set" to probe the server name: in recent versions of Perforce it will provide the settings that the client would use to talk to the server (and not simply print out the environment variables). Even if that doesn't work, "p4 where" will contact the right server by the usual rules; the only problem would be that, if that failed, the wrong server would be recorded as inactive. The only case not covered is if you need some global options to "p4". You can fix that by writing your own p4 front-end function. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070