如何从命令行更改perforce规范? 我想要做的是,我有一个工作区,其clobber选项设置为noclobber(默认值)。 现在我想把它改成clobber。
我知道我们可以直接从p4v做到,但我不想那样做。 我也知道,如果我们在cmd中运行'p4 client'命令,它将在文本编辑器中打开P4CONFIG文件,我们可以将noclobber更改为clobber并保存文件及其完成,但我也不想这样做。
请告诉我在不使用p4v或不编辑P4CONFIG.txt的情况下直接将noclobber更改为clobber的特定命令。
谢谢和问候,Noob perforce管理员
How to change perforce specs from command line? What I want to do is, i have a workspace whose clobber option is set to noclobber(default value). Now i want to change it to clobber.
I know we can do it directly from p4v, but i dont want that. I also know that if we run 'p4 client' command in cmd, it will open P4CONFIG file in text editor, where we can change noclobber to clobber and save the file and its done, but i also dont want that too.
Please tell me the specific command which directly changes the noclobber to clobber without using p4v or without editing P4CONFIG.txt.
Thanks and Regards, Noob perforce admin
最满意答案
使用Perl,Python,Ruby甚至Powershell编写脚本非常容易。 这是Powershell中的单线程:
p4 client -o | %{$_ -replace "noclobber", "clobber"} | p4 client -i
It's pretty easy to script this with Perl, Python, Ruby, or even Powershell. Here's a one-liner in Powershell:
p4 client -o | %{$_ -replace "noclobber", "clobber"} | p4 client -i
更多推荐
发布评论