使用多个 Perforce 仓库与 P4CONFIG
If your project contains directories that are stored in the different Perforce depots, you might need to switch between them. GoLand 使用 P4CONFIG ,当您使用 Perforce 管理的目录时,会自动切换到相应的仓库。
P4CONFIG 是一个环境变量,其中包含 P4CONFIG 文件的名称,不包括路径。 如果某个目录已关联 Perforce(请参阅 版本控制集成支持 ),GoLand 会在该目录及其上级目录中查找 P4CONFIG 文件;若未找到该文件,GoLand 会在其安装目录的 bin 目录中查找。 找到 P4CONFIG 文件后,GoLand 会使用其中包含的设置连接到相应的 Perforce 仓库。
一个示例 P4CONFG 文件可能包含以下内容:
P4CLIENT=MyClient
P4USER=MySelf
P4PORT=ida:3456
在每个关联了 Perforce 的目录中创建一个 P4CONFIG 文件。
创建一个
P4CONFIG环境变量,其中包含不带路径的文件名。
最后修改日期: 2025年 9月 26日