The p4v Perforce GUI client has an 'Actions > Remove from Workspace' menu command which removes all files from the workspace that are under version control and were not opened for edit or delete.
p4v Perforce GUI客户端具有“操作>从工作区删除”菜单命令,该命令从工作区中删除所有受版本控制且未打开以进行编辑或删除的文件。
This functionality only seems to be available from the GUI client, I can't find any corresponding command in the ever growing list shown by p4 help commands
.
这个功能似乎只能从GUI客户端获得,我在p4 help命令显示的不断增长的列表中找不到任何相应的命令。
I thought of using p4 where
, p4 files
and some list filtering, but that doesn't seem trivial, so before I go about creating a script, does anyone have a better idea ?
我想过使用p4 where,p4文件和一些列表过滤,但这看起来并不简单,所以在我创建脚本之前,有没有人有更好的想法?
3 个解决方案
#1
28
Specifying a revision of either #none
or #0
will remove the files:
指定#none或#0的修订将删除文件:
p4 sync //depot/project/...#none
p4 sync //depot/project/...#0
Use the -f switch to force removal of the files even if they are writeable (it won't affect files that are checked out, however):
使用-f开关强制删除文件,即使它们是可写的(但它不会影响已检出的文件):
p4 sync -f //depot/project/...#0
#2
9
p4 sync ...#none
#3
4
The easy way to find GUI equivalent commands (p4 CLI commands) is to look at log tab in P4V. When we take any action on P4V GUI, the "log" tab shows the corresponding P4 CLI command being executed.
查找GUI等效命令(p4 CLI命令)的简便方法是查看P4V中的日志选项卡。当我们对P4V GUI执行任何操作时,“日志”选项卡会显示正在执行的相应P4 CLI命令。
#1
28
Specifying a revision of either #none
or #0
will remove the files:
指定#none或#0的修订将删除文件:
p4 sync //depot/project/...#none
p4 sync //depot/project/...#0
Use the -f switch to force removal of the files even if they are writeable (it won't affect files that are checked out, however):
使用-f开关强制删除文件,即使它们是可写的(但它不会影响已检出的文件):
p4 sync -f //depot/project/...#0
#2
9
p4 sync ...#none
#3
4
The easy way to find GUI equivalent commands (p4 CLI commands) is to look at log tab in P4V. When we take any action on P4V GUI, the "log" tab shows the corresponding P4 CLI command being executed.
查找GUI等效命令(p4 CLI命令)的简便方法是查看P4V中的日志选项卡。当我们对P4V GUI执行任何操作时,“日志”选项卡会显示正在执行的相应P4 CLI命令。