Perforce - 仅提交为分支打开的文件,而不提交为编辑打开的文件
当我在 Perforce 的分支中工作时,我经常意识到我需要一个我最初分支时没有分支的文件。
因此,我将文件添加到客户端,运行 p4integrate-bbranchname
,然后 p4submit
。
让我烦恼的是,我需要浏览要提交的文件列表,并删除所有打开进行编辑的条目。
我在 p4 help Submit
中看不到任何选项,但这似乎可能是一个相当常见的用例。
Quite often when I'm working in a branch in Perforce, I realise I need a file I didn't branch when I initially branched.
So, I add the file to my client, run p4 integrate -b branchname
, then p4 submit
.
Thing that bugs me is that I then need to go through the list of files for submit, and remove all entries that are open for edit.
I can't see any option in p4 help submit
, but it seems like this might be a reasonably common use case.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先
假设你的p4编辑器是vi,
在命令模式下输入这个命令
First do
Assuming your p4 editor is vi,
type this command in command mode
您可以选择在命令行上提交单个文件。
这样它就不会因为其他文件而困扰你了。
如果您有多个文件,那么也许您应该将当前正在编辑的所有文件移动到编号更改列表中,或者分支到编号更改列表上,这将提供您想要的分隔。
如果您打算这样做,那么从其中一个 GUI 管理编号的更改列表会容易得多。
You can choice to submit a single file on the command-line.
Then it won't bug you about the other files.
If you have more than one file, then maybe you should move all of the files you are currently editing onto an numbered changelist, or branch onto a numbered changelist, which will provide the separation you want.
If you're going to do this, it's much easier to manage numbered changelists from one of the GUIs.