Drew
Drew

Reputation: 4701

Perforce CLI hangs indefinitely

Surprizing little documentation on setting this up, so I'm sure this is a setup problem.

Steps to reproduce: Open terminal (p4.exe in PATH) type p4 [RET]

Hangs indefinitely. When I issue commands from emacs (ie p4 edit [file] it eventually comes back with

Perforce client error:
 Connect to server failed; check $P4PORT.
 TCP connect to perforce failed.
 perforce: host unknown.

Upvotes: 3

Views: 9350

Answers (3)

Abhishek
Abhishek

Reputation: 49

Please check if a p4 process running in background in the same shell. you need to stop already running process.

Upvotes: 1

thebiggestlebowski
thebiggestlebowski

Reputation: 2799

In my case I set these variables in order to get it to work (very annoying it just hangs instead of complaining of the missing configuration).

P4PORT P4USER P4CONFIG P4EDITOR

Upvotes: 0

user100766
user100766

Reputation:

The error message that is displayed when called from emacs points in the right direction, p4 can't find your perforce server (the default is perforce, that's where the perforce: host unknown comes from.

Make sure to either specify -p for your call to p4 or set the environment variable P4PORT. Beware, despite the name, P4PORT includes the hostname of the perforce server.

p4 -p serverhost:1666

I'm not sure why p4 would hang indefinitely on the CLI and return after some time when called from emacs.

Upvotes: 5

Related Questions