如何删除恢复文件的历史记录? (p4v)

发布于 2024-12-19 18:14:19 字数 572 浏览 1 评论 0原文

首先,如果术语不正确,我深表歉意。我最近才开始使用 P4,但遇到了一些问题。

假设我有一个名为 Program.cs 的文件。该文件有两个版本:版本#1 和#2。我意识到我不小心将更改提交到了服务器,所以我想返回到版本 #1,而不留下版本 #2 的任何痕迹。

到目前为止我所做的:

-Go to P4V GUI 
-Right click on the file I want to revert
-Select "Get revision..."
-Under "Specify revision using:" -> Revision -> 1 (in the "Enter revision number" box)
-Check "Force Operation" box

这似乎恢复了文件,但 GUI 然后在文件旁边显示一个黄色的小三角形。当我将鼠标悬停在它上方时,它显示“不是文件的最新修订版(2 号文件的第 1 号)”

我想要做的是完全删除确实存在修订版 #2 的任何记录,因为 #2 是我的产品严重的n00bish-ness,根本不应该提交。

有人可以告诉我该怎么做吗?

First of all, I apologize if the terminology is not correct. I have only recently started using P4 and am having some trouble with it.

Let's say I have a file called Program.cs. There are two versions of this file: Version #1 and #2. I realized that I have accidentally committed the changes to the server, so I want to go back to Version #1 without leaving any trace of Version #2.

What I have done so far:

-Go to P4V GUI 
-Right click on the file I want to revert
-Select "Get revision..."
-Under "Specify revision using:" -> Revision -> 1 (in the "Enter revision number" box)
-Check "Force Operation" box

This seems to revert the file, but the GUI then displays a little yellow triangle next to the file. When I hover above it, it says "not latest revision of file (#1 of 2)"

What I want to do, is completely erase any record that there has indeed been a Revision #2, since #2 is the product of my acute n00bish-ness and should never have been submitted at all.

Can someone please tell me how to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖阳 2024-12-26 18:14:19

永久删除文件的唯一方法就是删除。您可能需要管理员权限(我很少删除任何内容),您可以使用管理控制台或命令行 http://www.perforce.com/perforce/doc.current/manuals/cmdref/obliterate.html

或者,由于您已经有修订版 1,请检查它出,解决,进行更改,然后提交。将有 3 次修订,但 1 和 3 将完全相同。

更简单的是,恢复文件,然后右键单击历史记录中的版本 1 并选择“回滚到修订版本”

The only way to ever delete a file permanently is to obliterate. You'll probably need admin privileges (I very rarely ever obliterate anything), you can either use the Admin console, or the command line http://www.perforce.com/perforce/doc.current/manuals/cmdref/obliterate.html

Or, since you already have revision 1, check it out, resolve, taking your changes, then submit. There will be 3 revisions, but 1 and 3 will be exactly alike.

Even easier, revert the file, and then just right click on version 1 in the history and select "Rollback to Revision"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文