Timeline for answer to How to set client root in Perforce P4 when client unknown error comes by Samwise
Current License: CC BY-SA 3.0
Post Revisions
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 30, 2024 at 20:45 | comment | added | Samwise | ^ note that your CWD is generally only relevant to your P4CLIENT if you're using a P4CONFIG file. You can issue commands against a workspace from outside of its root, provided that you provide the P4CLIENT value. (But usually you do want to match the client to the root based on CWD which is why P4CONFIG is great -- it's just not set up by default.) | |
| Aug 30, 2024 at 17:00 | comment | added | cardiff space man |
I had an unknown client message, but then it turns out the bash-within-ssh session had been closed. Then when I reestabilished the session, I didn't return myself to a path within the client. So p4 info showed client unknown. I cd'd to the root of my workspace, and then p4 info showed the expected client path, and my p4 diff command worked.
|
|
| Dec 9, 2017 at 21:00 | comment | added | Samwise | Another possible reason for you to suddenly get "client unknown" errors would be that your hostname got changed when you reinstalled Windows (the client hostname is the default P4CLIENT value). If you explicitly set P4CLIENT and/or P4HOST you won't have this problem. | |
| Dec 9, 2017 at 19:36 | comment | added | dgnuff |
I also had the exact same problem under Windows: p4v worked just fine, but running commands e.g. p4 clean from the command line failed with the Client '<My_computer_name>' unknown - use 'client' command to create it. error. The very last line of @SamStafford 's reply fixed it - a pre-populated client spec opened in an editor, no need to change anything, just save it back and exit, and things were solved. In my case I very strongly suspect the cause was a "repair" of Windows I'd done very recently.
|
|
| Oct 16, 2015 at 9:14 | vote | accept | Bhavesh Agarwal | ||
| Oct 16, 2015 at 9:14 | comment | added | Bhavesh Agarwal | Thanks. The problem is solved now. I had to set P4CLIENT in my bash_profile "export P4CLIENT=${USER}_BANL121b92746_trunk" and it worked, both in terminal and Intellij Idea afterwards. Thanks for all the support. | |
| Oct 14, 2015 at 7:51 | comment | added | Samwise | Since you're hiding the P4PORT setting I can't be absolutely sure that you aren't connecting to the wrong server, but if the server is correct and the client name is correct, the only remaining explanation is that your client spec got deleted. Run "p4 client" to recreate it. | |
| Oct 14, 2015 at 6:12 | comment | added | Bhavesh Agarwal | Thanks Sam. I tried the suggestion, but unfortunately,didn't help. Also, client in p4settings.txt and by using "p4 info" under trunk directory is same, i.e. "bagarwal2_BANL121b92746_trunk"... Let me paste what I did: BANL121b92746:trunk bagarwal2$ echo $P4CONFIG p4settings.txt BANL121b92746:trunk bagarwal2$ p4 set P4CONFIG=p4settings.txt Perforce client warning: Warning: environment variable hides registry definition of P4CONFIG. BANL121b92746:trunk bagarwal2$ p4 info User name: bagarwal2 Client name: bagarwal2_BANL121b92746_trunk Client unknown. Current directory: /Users/bagarwal2/dev/trunk | |
| Oct 13, 2015 at 16:05 | history | edited | Samwise | CC BY-SA 3.0 |
added 256 characters in body
|
| Oct 13, 2015 at 14:42 | comment | added | Samwise | Edited to be more useful in light of the new information. | |
| Oct 13, 2015 at 14:42 | history | edited | Samwise | CC BY-SA 3.0 |
added 256 characters in body
|
| Oct 12, 2015 at 16:37 | comment | added | Samwise | The "workspace name" isn't a filesystem path, so if you're using a "full absolute path" you're not setting the workspace name. The root is stored in the server database and associated with the client (workspace) name, so if you connect to the right server (P4PORT) with the right client (P4CLIENT) all the other information is remembered automatically. | |
| Oct 12, 2015 at 8:49 | comment | added | Bhavesh Agarwal | BTW, I tried with both the workspace name and workspace name with full absolute path. | |
| Oct 12, 2015 at 8:48 | comment | added | Bhavesh Agarwal | Thanks Sam. I tried the command but still it shows the same error "client unknown" for the root. Doesn't this command sets only the client name and not the root? The reason I am asking is the name is already set in my case. | |
| Oct 12, 2015 at 8:23 | history | answered | Samwise | CC BY-SA 3.0 |