Perforce:如何删除 p4v 拒绝删除的更改列表? [英] Perforce: How can I delete a changelist that p4v refuses to delete?

查看:45
本文介绍了Perforce:如何删除 p4v 拒绝删除的更改列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 perforce 一段时间后,我留下了许多仍处于打开状态的更改列表.为了清理,我想摆脱它们的一个子集.所以这就是让事情变得复杂的原因:

After a while of working with perforce I was left with a lot of still open change lists. To clean up I want to get rid of a subset of them. So here is what makes this complicate:

  • 对于部分更改,客户端主机已更改.
  • 某些更改包含搁置的文件.
  • 更改列表中的文件可能会被删除或移动.

当变更列表满足上述一项或多项要求时,p4v(可视化客户端)将不允许您删除变更列表.

When one or more of above points are true for a change list, p4v (the visual client) will not allow you to delete the change list.

那么删除这些更改列表的有效方法是什么?

So what is an effective way of deleting these change lists?

推荐答案

首先,perforce 拒绝在任何更改列表上工作如果主持人在他们的工作区中不同.所以第一步将工作区的主机更改为当前的主机.这可以通过可视化客户端 p4v 轻松完成.打开工作区的属性,选择编辑并更改主机.

First of all, perforce refuses to work on any change lists if the host differs in their workspace. So step one is to change the host of the workspace to the current one. This can easily be done with the visual client p4v. Open the properties of a workspace, choose edit and change the host.

然后您可以使用命令行来摆脱讨厌的更改列表:

Then you can use the command line to get rid of the pesky change list(s):

# to delete a changelist
CLIENT="name_of_your_client"
CHANGE="number_of_the_changelist_to_delete"
p4 -c $CLIENT shelve -c $CHANGE -d //... # Delete all shelved files from it.
p4 -c $CLIENT revert -k -c $CHANGE //... # Revert all files from changelist (only metadata).
p4 -c $CLIENT change -d $CHANGE # Finally delete the changelist.

在最后一个命令之后,更改列表将永远消失.

After the last command the change list will be gone forever.

这篇关于Perforce:如何删除 p4v 拒绝删除的更改列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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