Perforce CLI 无限期挂起
令人惊讶的是关于设置此功能的文档很少,所以我确定这是一个设置问题。
重现步骤: 打开终端(路径中的 p4.exe) 输入 p4 [RET]
无限期挂起。当我从 emacs 发出命令时(即 p4 edit [file] 它最终会返回
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to perforce failed.
perforce: host unknown.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从 emacs 调用时显示的错误消息指向正确的方向,p4 无法找到您的 perforce 服务器(默认为
perforce
,这就是perforce: hostunknown
>确保为对 p4 的调用指定
-p
或设置环境变量P4PORT
请注意,尽管有名称,P4PORT 仍包含 perforce 的主机名。 。p4 -p serverhost:1666
我不确定为什么 p4 会无限期地挂在 CLI 上,并在一段时间后从 emacs 调用时返回
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 theperforce: host unknown
comes from.Make sure to either specify
-p
for your call to p4 or set the environment variableP4PORT
. 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.
请检查同一 shell 中是否有 p4 进程在后台运行。您需要停止已经运行的进程。
Please check if a p4 process running in background in the same shell. you need to stop already running process.
就我而言,我设置了这些变量以使其正常工作(非常烦人,它只是挂起而不是抱怨缺少配置)。
P4端口
P4用户
P4配置
P4编辑器
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