如何从命令行创建一个perforce空变更列表 [英] How to create a perforce empty changelist from command line

查看:427
本文介绍了如何从命令行创建一个perforce空变更列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用命令 p4 change -i 从命令行创建一个空的更改列表,但似乎此命令没有任何作用,我没有收到任何错误/成功消息,命令行仅返回任何内容,而我必须使用ctrl + c杀死它。

i'm trying to create an empty changelist from command line using the command p4 change -i but seems that this command does nothing, i don't get any error/success message, the command line simply return nothing and i have to kill it with ctrl+c.

我的p4客户端正常工作,我可以看到我的所有信息并正确执行所有其他操作,似乎仅在创建一个新的挂起的变更列表时会有问题。

My p4 client works, i'm able to see all my info and doing all other operations correctly, seems to have problem only to create a new pending changelist.

有人遇到过同样的问题吗?

Anyone experienced the same issue?

点我已经检查了P4V创建空变更列表的方法,它实际上使用了 p4 change -i 命令,没有任何问题,但是如果我尝试使用cli中的同一命令

P.s. I've checked the P4V way to create an empty changelist and it actually using the p4 change -i command without any issue, but if i try to use the same command from cli it will silently fail.

推荐答案

如果以交互方式使用命令行,则可以使用常规的 p4 change命令去:

If you're using the command line interactively, the regular "p4 change" command is the way to go:

p4 change

这将在编辑器中打开更改列表规范,以便您填写它,并在将文件保存到编辑器中并退出时保存更改列表。

This opens the changelist spec in your editor so you can fill it out, and saves the changelist when you save the file in your editor and exit it.

如果您正在编写脚本,则可以使用 p4 change -i,但需要确保通过stdin将其输入有效的变更列表格式。 p4 change -o命令为您提供了从 p4 change获得的相同表格(通过stdout而不是您的编辑器),因此剩下的就是填写描述和/或修改要包含的文件列表。 。 --field选项在这里很有用:

If you're scripting, you can use "p4 change -i" but you need to make sure to feed it a valid changelist form via stdin. The "p4 change -o" command gives you the same form you get from "p4 change" (via stdout instead of your editor), so all that's left is to fill out the description and/or modify the list of files to be included. The --field option is useful here:

p4 --field "Description=My pending change" change -o | p4 change -i

如果您希望新的更改列表为空,而不是继承默认的打开文件更改列表,将文件字段空白:

If you want the new changelist to be empty rather than inheriting open files from the default changelist, blank the Files field:

p4 --field "Description=My pending change" --field "Files=" change -o | p4 change -i

这篇关于如何从命令行创建一个perforce空变更列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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