Reputation: 8277
I have recently start using perforce.
in my organization we have tool that translates installation path to depot path where repos are , I want to know if we can set that translated path in the already open perforce from the commandline ?
which in turn also brings perforce (p4v) in focus.
Upvotes: 0
Views: 434
Reputation: 71464
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.
Upvotes: 1