Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Minor VCS Info things



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 <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author