Perforce:从命令行“从工作区中删除"? [英] Perforce: 'remove from workspace' from command line?

查看:97
本文介绍了Perforce:从命令行“从工作区中删除"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

p4v Perforce GUI 客户端有一个操作 > 从工作区中删除"用于从工作区中删除所有受版本控制且未打开进行编辑或删除的文件的菜单命令.

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.

这个功能似乎只能从 GUI 客户端使用,我在 p4 help commands 显示的不断增长的列表中找不到任何相应的命令.

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.

我想过使用 p4 wherep4 files 和一些列表过滤,但这似乎不是微不足道的,所以在我开始创建脚本之前,有没有人有更好的主意吗?

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 ?

推荐答案

指定 #none#0 的修订版将删除文件:

Specifying a revision of either #none or #0 will remove the files:

p4 sync //depot/project/...#none
p4 sync //depot/project/...#0

使用 -f 开关强制删除文件,即使它们是可写的(但是它不会影响签出的文件):

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):

p4 sync -f //depot/project/...#0

这篇关于Perforce:从命令行“从工作区中删除"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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