|
|
|
[
Permlink
| « Hide
]
Kevin Bourrillion - 04 Aug 05 07:12
I'm curious why this hasn't been fixed. Why have the option in there if it doesn't work? Just wondering. Thanks.
I've looked at this and it's a problem with the working directory that p4 is executed in. IDEA executes p4 from its run folder, like /usr/local/idea-5.0/bin, so it misses .p4config files in the client tree itself. (I believe it only picks up .p4config files in ~ and whatever systemwide p4 config folder is set up.)
I wasn't able to reproduce any problems with this option. If you still have problems with the latest EAP build (http://www.intellij.net/eap/
Dmitry, yes it still exists. P4CONFIG is ".p4config". The .p4config file is in the same folder as the .iml file, or one folder above it, depending on other circumstances. The .p4config file contains only P4CLIENT and P4PASSWD. We do not use native connection, we are on Linux.
Keith:
I have tried using P4CONFIG on Windows and on Linux - it works for me. Specifically: Do you do anything differently? BTW, where do you set P4PORT and P4CLIENT variables? Vladislav, I don't know if I've ever tried reopening the project. Is that necessary?
We don't set P4PORT or P4USER in the .p4config file. Also, we don't store the .p4config file in a project root, it's usually in the same folder as the .iml file, or in its parent, which we do not add as content root. Keith,
I have tried placing .p4config file in different places, and Perforce integration works for me every time. Though I have noticed that if I add .p4config AFTER the project opening, files names remain brown even though all other Perforce actions work (Diff, Update project, edit/submit etc). This is currently cured only by project reload. May I ask you to check if anything changes after the project reload? After reopening IDEA? Below is the p4.output I get when I use P4CONFIG option in IDEA. I have put "***" instead of strings I do not want to be public. The fact that p4 calls my client "miami" which is in fact my host name means that the current directory is wrong. I have .p4config in my root directory, this is why I do not get "incorrect password" errors. If I set the same options in IDEA as I have in my .p4config then Perforce integration works. p4 commands work from the project directory and any of its subdirectories.
Here is my configuration: And this is my p4.output: infoErrCode=0 StdErr:------------ End---------------- StdErr:------------ End---------------- StdErr:------------ End---------------- StdErr:------------ When trying to reproduce this problem make sure you create a new client and you have only one .p4config file you are experimenting with. Perforce looks for this file in many places (including the user home dir) so make sure you have only one such file. Changing the name of the file to something funky (e.g. zebra) will also help eliminate the chance of pre-existing files makihng it work for you. By analyzing your p4.output you can verify what client name is used by IDEA. I hope this approach will help you reproduce this bug. Please also note that this problem happens on Linux. Please let me know if you still can not reproduce this problem and I will create a standalone test case for you. Thanks, The build 5734 contains detailed logging of p4config operations. To enable the logging, add the following lines to bin\log.xml before the <root> item:
<category name="#org.jetbrains.idea.perforce.perforce.connections.PerforceConnectionManager"> <priority value="DEBUG"/> <appender-ref ref="CONSOLE-ALL"/> <appender-ref ref="FILE"/> </category> The log will let you see where IDEA is searching for the .p4config file. Done. Please see the output below. I was initially using the configuration without P4CONFIG, then switched to P4CONFIG. Here is the output - hope it helps. From what I can tell IDEA has decided to use the file .p4config that is at the parent directory of my p4 client directory and that .p4config does not have the client name (because I have multiple p4 client directories under that parent directory). This is not correct bahavior - the correct behavior is to search for the .p4config file starting from the current directory and use the first file that is found.
Thanks, [ 37806] DEBUG - ions.PerforceConnectionManager - getAllConnections(): not using p4config, returning singleton connections at org.jetbrains.idea.perforce.perforce.PerfCommands.checkError(PerfCommands.java:1619) Correction: I have .p4config file in my home directory, not the roor directory of my p4 clients.
Update: I have tried to remove the .p4config file from my home directory, it made the situation worse as follows: The Java files which were previously recognized as being in Perforce now show up as not in Perforce. Here is the log I get after re-starting the IDEA: [ 29947] DEBUG - ions.PerforceConnectionManager - ensureRootConnections() initializing map at org.jetbrains.idea.perforce.perforce.PerfCommands.checkError(PerfCommands.java:1619) Maxim: Do I understand correctly that:
In this case the problem is clear: IDEA searches for p4config files only upward from the module content root. It's possible to change that, but likely not for 6.0. | |||||||||||||||||||||||||||||||||||||||||||||||||||