直接从 Perforce 命令行更改工作区破坏选项 [英] Changing workspace clobber option directly from Perforce command line

查看:70
本文介绍了直接从 Perforce 命令行更改工作区破坏选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从命令行更改 perforce 规范?我想要做的是,我有一个工作区,其 clobber 选项设置为 noclobber (默认值).现在我想把它改成clobber.

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.

我知道我可以直接从 p4v 中完成,但我不想要那样.我也知道如果我运行 p4 client,它会在文本编辑器中打开 P4CONFIG 文件,在那里我可以将 noclobber 更改为 clobber 并保存文件并完成了,但我也不想要那个.

I know I can do it directly from p4v, but I don't want that. I also know that if I run p4 client, it will open P4CONFIG file in text editor, where I can change noclobber to clobber and save the file and it's done, but I also don't want that.

请告诉我不使用p4v或不编辑P4CONFIG直接将noclobber改为clobber的具体命令.

Please tell me the specific command which directly changes noclobber to clobber without using p4v or without editing P4CONFIG.

推荐答案

使用 Perl、Python、Ruby 甚至 Powershell 编写脚本非常容易.这是 Powershell 中的一行代码:

It's pretty easy to script this with Perl, Python, Ruby, or even Powershell. Here's a one-liner in Powershell:

p4 客户端 -o |%{$_ -replace "noclobber", "clobber"} |p4 客户端 -i

这篇关于直接从 Perforce 命令行更改工作区破坏选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆