通过命令行自动化,create/edit 客户端规范视图

through command line automation, create/edit client specification view

我有两个目录,例如:

//A/B/C/Folder-One/

//A/B/C/D/Folder-Two/

现在,在自动化中,我想将这些路径映射到一个客户端并同步它。

喜欢 //A/B/C/Folder-One/ //MYClient/Folder-One/... //A/B/C/Folder-Two/ //MYClient/Folder-Two/...

任何人都可以帮助我如何通过自动化实现这一目标?

假设说明:在当前目录中,我有 .perforce 文件,其中配置了各个变量并且 p4 client -o 也正常工作。

--field undoc 选项使这非常简单:

p4 --field "View+=//A/B/C/Folder-One/... //MYClient/Folder-One/..." client -o | p4 client -i
p4 --field "View+=//A/B/C/Folder-Two/... //MYClient/Folder-Two/..." client -o | p4 client -i

请参阅 p4 help undoc 以及此博客 post:https://www.perforce.com/blog/vcs/20161-command-line-roundup