如何删除 Perforce 中的工作区(使用 p4v)?
我是 Perforce 的新手,创建了一些工作区作为熟悉它的练习。 现在我想删除一些工作区。 我只是想删除工作区,以便它们不会出现在工作区视图的下拉列表中(不想想要对实际的仓库文件执行任何操作)。
谷歌搜索答案会产生“使工作区处于活动状态”的建议(我猜这意味着在工作区下拉列表中选择它?),然后从“编辑”菜单中将其删除。 不幸的是,当我尝试此操作时,删除选项呈灰色。
有人知道如何做到这一点,还是我只能忍受垃圾工作区? 我已经从磁盘中物理删除了其中一个,它仍然出现在工作区下拉列表中,而且我现在甚至无法将其与软件仓库同步,所以我想这不是该怎么做。
I'm new to Perforce and have created a few workspaces as exercises for getting familiar with it. Now I would like to delete some of the workspaces. I just want to get rid of the workspaces so that they do not appear on the drop-down in the workspaces view (do not want to do anything with actual depot files).
Googling up an answer yields the suggestion to "make the workspace active" (I guess that means select it in the workspace dropdown?) and then delete it from the "edit" menu. Unfortunately, the delete option is grayed-out when I try this.
Anyone know how to do this, or do I just have to live with junk workspaces? I've physically deleted one of them from the disk, and it still appears in the workspace drop down, and I can't even synchronise it with the depot now, so I guess that's not how to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
从“查看”菜单中,选择“工作区”。 您将看到您创建的所有工作区。 选择要删除的工作区,点击“编辑”-> “删除工作区”,或右键单击并选择“删除工作区”。 如果工作区被“锁定”以防止更改,您将收到一条错误消息。
要解锁工作区,请单击“编辑”(或右键单击并单击“编辑工作区”)以拉出工作区编辑器,取消选中“锁定”复选框,然后保存更改。 工作区解锁后,您可以将其删除。
根据我的经验,工作区将继续显示在下拉列表中,直到您单击它,此时 p4v 会发现您已删除它并将其从列表中删除。
From the "View" menu, select "Workspaces". You'll see all of the workspaces you've created. Select the workspaces you want to delete and click "Edit" -> "Delete Workspace", or right-click and select "Delete Workspace". If the workspace is "locked" to prevent changes, you'll get an error message.
To unlock the workspace, click "Edit" (or right-click and click "Edit Workspace") to pull up the workspace editor, uncheck the "locked" checkbox, and save your changes. You can delete the workspace once it's unlocked.
In my experience, the workspace will continue to be shown in the drop-down list until you click on it, at which point p4v will figure out you've deleted it and remove it from the list.
也可以在没有可视客户端的情况下使用以下小脚本来完成。
It could also be done without a visual client with the following small script.
在 P4V 中点击查看> 工作区
如果要删除的工作区在列表中不可见,您可能需要取消选中仅显示可供此计算机使用的工作区框,
右键单击要删除的工作区。删除并选择编辑工作区“My_workspace”
在高级选项卡上取消选中锁定:只有所有者可以编辑工作区设置>复选框 然后点击确定
现在回到Perforce的工作区选项卡右键单击要删除的工作区并选择删除工作区'My_workspace'
P4V应该删除单击下拉列表中的项目。
有时,以前删除的工作空间仍保留在下拉列表中,P4V 显示以下错误:
如果发生此错误时,工作区(可能在另一台主机上)可能只是被卸载。 单击 P4V 工作区回收站
在出现的已卸载工作区窗口中右键单击有问题的工作区工作区,然后选择删除工作区“My_workspace”。 P4V 现在应该从下拉列表中删除工作区项目。
In P4V click View > Workspaces
If the workspace to be deleted is not visible in the list you may have to uncheck the box Show only workspaces available for use on this computer
Right-click the workspace to be deleted and choose Edit Workspace 'My_workspace'
On the Advanced tab uncheck the box Locked: only the owner can edit workspace settings > then click OK
Now back on the Workspaces tab of Perforce right-click the workspace to be deleted and choose Delete Workspace 'My_workspace'
P4V should remove the item from the drop-down list when clicking on it.
There is a case where a previously deleted workspace remains in the drop-down list, and P4V displays the following error:
If this error occurs, the workspace(possibly on another host) may have only been unloaded. Click the P4V Workspaces Recycle bin
In the resulting Unloaded Workspaces window right-click the offending workspace and choose Delete Workspace 'My_workspace'. P4V should now remove the workspace item from the drop-down list.
如果您已成功从工作区选项卡中删除,但它仍然显示在下拉菜单中。 然后,您也可以按照以下步骤成功删除它:
user_name 将是您计算机的用户名
将有两个标记
varName = "RecentlyUsedWorkspaces" 删除已删除的工作空间标记
propertyList 标记将在那里,其中 varName=deleted_workspace_name
删除该标签。
下拉菜单中的工作区名称将被删除
If you have successfully deleted from workspace tab but still it is showing in drop down menu. Then also you can successfully remove that by following these steps:
user_name will be your username of your computer
There will be two tag
varName = "RecentlyUsedWorkspaces" remove the deleted workspace tag
A propertyList tag will be there with varName=deleted_workspace_name
delete that tag.
from drop down menu workspace name will be deleted