#20 Limited Perforce P4CONFIG support

closed-accepted
nobody
None
5
2007-11-23
2007-07-31
Aron Atkins
No

By default, Perforce determines the active client by looking at the P4CLIENT environment variable. If P4CLIENT is not set, Perforce next looks at P4CONFIG.

The P4CONFIG environment variable names a relative filename which contains a client name. Perforces searches for this filename in ancestor directories.

The P4CONFIG environment variable makes it really easy to switch between directories which use different clients.

Example:
P4CONFIG=p4config.txt

~/dev/mainline/p4config.txt:
P4CLIENT=aron-mainline

~/dev/v1.2/p4config.txt
P4CLIENT=aron-v12

Perforce commands will use the correct client based on the current directory. The directory ~/dev/mainline/test uses the aron-mainline client, for example.

This initial patch tests for the presence of the P4CONFIG. It does not test for the existence of the named file. It does not test if Perforce can discover a valid client.

< } elseif {[info exists ::env(P4CLIENT)]} {
---
> } elseif {[info exists ::env(P4CLIENT)] || [info exists ::env(P4CONFIG)]} {

Discussion

  • DorothyR

    DorothyR - 2007-11-14
    • status: open --> open-accepted
     
  • DorothyR

    DorothyR - 2007-11-23
    • status: open-accepted --> closed-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks