Perforce“锁定客户端”错误

发布于 2024-09-05 00:29:00 字数 454 浏览 5 评论 0原文

我是 Perforce 的新手,进展并不顺利。但目前,我完全陷入困境,因为我只能说:

$ p4 open a_code_file.cpp
Locked client 'my_hostname' can only be used by owner 'perforce'.

我完全不知道我做了什么来扰乱它,并且错误消息本身对我来说是毫无意义的胡言乱语。 “perforce”不拥有任何东西 - 所有文件都归我所有。我在 Perforce 存储库中,即,几个目录上方有一个 .p4rc


编辑:似乎只是一些文件。如果我:

$ cd some_other_directory_in_the_repo
$ p4 open a_file

...它有效。所以这只是一些事情...

I'm new to Perforce, and it is not going well at all. But currently, I am completely stuck, as all I can get it to say is:

$ p4 open a_code_file.cpp
Locked client 'my_hostname' can only be used by owner 'perforce'.

I have absolutely no idea what I did to upset it, and the error message itself is meaningless gibberish to me. "perforce" doesn't own anything - all the files are owned by me. I am in a Perforce repository, ie, there's a .p4rc a few directories up.


Edit: It only seems to be some files. If I:

$ cd some_other_directory_in_the_repo
$ p4 open a_file

... it works. So it's only some things...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烛影斜 2024-09-12 00:29:00

“锁定客户端”错误表明 p4 正在尝试使用以您的主机名命名、由用户拥有的客户端工作区。如果 Perforce 在注册表(在 Windows 上)、环境变量或环境文件中找不到有效的客户端名称,它将默认使用以您的主机名命名的客户端工作区。

听起来 Perforce 无法为您的“损坏”目录找到有效的客户端工作区,并为您的“工作”目录找到一个有效的客户端工作区。

由于您有一个目录可以工作,而一个目录则不能,您可以尝试:

$ p4 set

从两个目录中比较结果吗?如果 Perforce 可以找到有效的客户端,您将看到类似以下内容:(

P4CLIENT=XXXX (config)

“(config)”表示 Perforce 正在从配置文件中获取该配置变量。请参阅 p4 help set 了解有关您可以通过多种方式设置变量。)

还要查找类似以下的行:

P4CONFIG=.p4env

Perforce 将使用它来搜索工作区配置。如果您使用名为 .p4rc 的文件,则应将 P4CONFIG 设置为该文件。

The "locked client" error suggests that p4 is trying to use a client workspace, named after your hostname, owned by the user perforce. If Perforce can't find a valid client name, either in the registry (on Windows), environment variables, or in an environment file, it'll default to using a client workspace named after your hostname.

It sounds like Perforce can't find a valid client workspace for your "broken" directory, and finds one for your "working" directory.

Since you have one directory that works, and one directory that doesn't, can you try:

$ p4 set

from both directories, and compare the results? If Perforce can find a valid client, you'll see something like:

P4CLIENT=XXXX (config)

(the "(config)" means Perforce is getting that configuration variable from a configuration file. Consult p4 help set for more information on the various ways you can set variables.)

Look also for a line like:

P4CONFIG=.p4env

which is what Perforce will use to search for your workspace configuration. If you're using a file named .p4rc, that's what P4CONFIG should be set to.

夏九 2024-09-12 00:29:00

当我分心并忘记导出我的 P4CLIENT 变量时,我遇到了这个问题,即:

P4CLIENT=XXXXX

而不是:

export P4CLIENT=XXXXX

I ran into this when I was distracted and forgot to export my P4CLIENT variable, i.e.:

P4CLIENT=XXXXX

Instead of:

export P4CLIENT=XXXXX
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文