实际上,如何删除未提交的新/添加文件的待处理更改?

发布于 2024-07-24 08:52:24 字数 406 浏览 2 评论 0原文

我正在尝试强制删除待处理的更改列表。 所有文件(20 个旧文件)都是新文件,但尚未提交/提交。 所以在 p4Win 中,它们显示红色 + 十字。 我无法从更改列表中删除这些文件。 我该如何删除这些文件?

感谢您提供右键单击并恢复的答案。 我已经尝试过,但失败并出现下面的示例错误字符串。

Operation: user-revert
Librarian digest source/.../foo.c failed.
RCS checkout 1.715484 failed!
RCS no such revision 1.715484!
//source/.../foo.c#1 - was add, reverted

我也尝试过 p4 revert 命令,但它失败并出现相同的错误。

I am trying to remove a pending changelist in perforce. All the files (20 old) are new but have not be committed/submitted yet. So in p4Win, they show a RED + cross. I am failing to remove these files from the change list. How do I go about getting rid of these files?

Thanks for the answers to right-click and revert. I have tried that but it fails with the example error strings below.

Operation: user-revert
Librarian digest source/.../foo.c failed.
RCS checkout 1.715484 failed!
RCS no such revision 1.715484!
//source/.../foo.c#1 - was add, reverted

I've also tried the p4 revert command but it fails with same error(s).

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

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

发布评论

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

评论(7

千纸鹤带着心事 2024-07-31 08:52:25

perforce 支持小组使用“revert -k”进行了修复。 他们怀疑这可能是由于客户端工作区中的重叠值造成的,但还没有具体说明。

Fixed with "revert -k" by perforce support group. They suspect it may be due to overlay values in the client workspace but have not been very specific.

淡淡離愁欲言轉身 2024-07-31 08:52:25

您如何尝试删除这些文件?

自从我愤怒地使用 Perforce 以来已经有一段时间了,但我似乎记得您只需右键单击并恢复文件即可。

我刚刚尝试过这个,它对我来说效果很好(程序员的哀叹!)。 它使用以下 p4 命令:

p4 恢复 //depot/test.txt

其中 test.txt 是测试文件的名称。

更新

新文件是否仍然存在于您的本地硬盘上?

文件在仓库中的路径是否仍然存在? IE。 你的路径中的“...”是什么。

How are you trying to remove the files?

It's been a while since I used Perforce in anger but I seem to remember that you just had to right click and revert the file.

I've just tried this and it worked OK for me (the programmer's lament!). It uses the following p4 command:

p4 revert //depot/test.txt

Where test.txt is the name of the test file.

Update

Does the new file still exist locally on your hard drive?

Does the path where the file would be in the depot still exist? ie. what's in the "..." of your path.

梦冥 2024-07-31 08:52:25

恢复文件,右键单击更改列表中的文件并选择恢复,这将删除添加的文件。

Revert files, right-click on file in change list and select revert, this will remove added files.

蓦然回首 2024-07-31 08:52:25

也许在这个阶段尝试 Perforce 支持。

Maybe try Perforce support at this stage.

装纯掩盖桑 2024-07-31 08:52:25

要删除当前目录和子目录中所有添加的文件:

p4 revert ...

To remove all added files in current and sub directories:

p4 revert ...
夏有森光若流苏 2024-07-31 08:52:25

就我而言,发生这种情况是因为 RCS 文件(库中包含所有修订信息的具有 ,v 扩展名的实际文件)实际上缺少相关修订的信息。 我能够从备份中恢复文件。

In my case this happened because the RCS files (the actual files with ,v extension in the depot that contain all the revision information) were literally missing the information for the revision in question. I was able to restore the files from backup.

烟火散人牵绊 2024-07-31 08:52:25

我遇到了同样的问题,我添加了 .exe 文件,但后来想排除它们。 perforce 文档提供了帮助:

http://www.perforce。 com/perforce/doc.current/manuals/p4eclipse/topics/adding.html

从源代码管理中排除文件

重要提示:将文件放置在以下位置后,您将无法排除它们
强制控制。 如果您在更改列表中打开了文件并且您
想要将它们排除在 Perforce 控制之外,请将它们从 Perforce 控制中恢复
在排除它们之前更改列表。

工作起来就像一个魅力。

I had the same problem, I had added the .exe files but wanted to exclude them afterwards. The perforce documentation helped:

http://www.perforce.com/perforce/doc.current/manuals/p4eclipse/topics/adding.html

Excluding Files from Source Control

Important: you cannot exclude files after you have placed them under
Perforce control. If you have files opened in a changelist and you
want to exclude them from Perforce control, revert them from the
changelist before excluding them.

Worked like a charm.

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