如何检查文件是否已标记为添加?
How to check if a file is already marked for add?
我想检查一个文件是否已经在本地标记为添加,而不是添加所述文件。是否可以使用 Perforce 命令进行此检查?
您可以检查文件是否被 运行 和 fstat command 标记为添加。如果命令输出包含字符串 "action add"
,则表示该文件已标记为要添加。
如果您使用 -n
选项,它会预览添加操作,告诉您将添加哪些文件,但不会实际添加文件。
p4 add -n testfile
我个人使用以下两个命令:
p4 diff -sa // to show list of all opened files
p4 diff -se // to show list of all files that are with changes but not opened
我想检查一个文件是否已经在本地标记为添加,而不是添加所述文件。是否可以使用 Perforce 命令进行此检查?
您可以检查文件是否被 运行 和 fstat command 标记为添加。如果命令输出包含字符串 "action add"
,则表示该文件已标记为要添加。
如果您使用 -n
选项,它会预览添加操作,告诉您将添加哪些文件,但不会实际添加文件。
p4 add -n testfile
我个人使用以下两个命令:
p4 diff -sa // to show list of all opened files
p4 diff -se // to show list of all files that are with changes but not opened