2

我有以下perforce.myClient包含不同目录的 perforce 客户端。当我打开文件进行编辑时,使用/perforce.myClient/p4 edit someFile 它失败并显示以下消息 /perforce.myClient/someFile is not under clients root '/my/other/perforce/client'

我做了以下操作以确保 perforce 选择了正确的客户

setenv P4CLIENT perforce.myClient

检查根是否指向正确的位置p4 client perforce.myClient

我还能如何强制客户端?

4

2 回答 2

1

P4CONFIG 文件对此非常有用。做这个:

p4 set P4CONFIG=.p4config
echo P4CLIENT=perforce.myClient>/perforce.myClient/.p4config
echo P4CLIENT=my.other.perforce.client>/my/other/perforce/client/.p4config

现在您的 P4CLIENT 将根据您的工作目录自动更改。

http://www.perforce.com/perforce/doc.current/manuals/cmdref/P4CONFIG.html

于 2015-12-03T20:11:12.907 回答
0

您应该能够在命令中使用全局选项,例如

p4 -c myclient edit -c mychangelist //...

全局选项出现在命令名称之前。

于 2015-12-03T16:20:09.853 回答