Perforce's solution for this is P4CONFIG
. Do:
p4 set P4CONFIG=p4config.txt
Then, in the path you want to associate with a particular server ("repo" in gitspeak), create a file called p4config.txt
that contains:
P4PORT=your_server:1666
The P4CONFIG
file can also contain values for P4USER
, P4CLIENT
, etc.
It sounds like your tool should simply be modified to write its information to P4CONFIG
files so that Perforce client tools can pick the information up automatically. Failing that, you might be able to script something around this tool that queries it and then converts its output to P4CONFIG
settings.