If the file is 'p4config.txt', then you should do
p4 set P4CONFIG=p4config.txt
not
p4 set P4CONFIG=p4config
You'll know it's working when 'p4 set' prints "(config 'p4config.txt')".
Question
Firstly i'm a total beginer with Perforce, and i'm learning through its documentations mostly.
So, we are about to migrate from CVS to Perforce, and i recently learned a good way to avoid changing the P4CLIENT for each workspace, which is creating a P4CONFIG file inside the workspace root.
So i have used the command:
p4 set P4CONFIG=p4config
(and my current directory is my workspace root, and the p4config.txt is located there)
in my p4config file i have the following:
P4PORT=host:port
P4USER=user
P4CLIENT=myWorkspace
i have already created 'myWorkspace' with the command 'p4 client' mapping to myworkspace root and its alright.
However when i try the command
p4 info
it shows my 'client name:' as my hostname, showing that the variable haven't been set.
and when i try 'p4 set P4CONFIG' it prints:
P4CONFIG=p4config.txt (set) (config 'noconfig')
I've tried with my p4config.txt full path, and still gets the same...
Does anyone have any idea what the problem is?
By the way, it's running on Windows.
Solution
If the file is 'p4config.txt', then you should do
p4 set P4CONFIG=p4config.txt
not
p4 set P4CONFIG=p4config
You'll know it's working when 'p4 set' prints "(config 'p4config.txt')".
OTHER TIPS
I had the same problem on Windows and I was finally able to figure it out. I kept on getting:
P4CONFIG=p4config.txt (set) (config 'noconfig')
But I had the variable set correctly as per the documentation.
Even though the P4V documentation states to add just the file name, I had to also include the full path to file. I had to do it for both P4CONFIG and P4IGNORE.
Now when I run p4 set
I see all of the correct information.