签入时出现 cvs 错误

发布于 2024-07-05 10:04:57 字数 170 浏览 6 评论 0原文

添加新文件后尝试提交到 cvs 分支时出现此错误

Assertion failed: key != NULL, file hash.c, line 317

知道如何修复它以便我可以检查我的代码吗?
服务器和客户端都是Linux,并且涉及预提交。

When trying to commit to a cvs branch after adding a new file I get this error

Assertion failed: key != NULL, file hash.c, line 317

Any idea how to fix it so I can check my code in?
Both server and client are Linux and there are pre-commits involved.

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

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

发布评论

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

评论(4

因为看清所以看轻 2024-07-12 10:04:57

您是否在 Windows 上,是否将文件重命名为具有不同大小写的相同名称(例如 MAKEFILE、Makefile 与 makefile)? CVS 曾经遇到过这个问题(也许现在仍然如此?):

OSDir/mailarchive - 主题:回复:hash.c.312:findnode:

马努写道:

<块引用>

我尝试在我的 cvs 树中将“makefile”重命名为“Makefile”,然后:

cvs: hash.c:312: findnode: Assertion `key != ((void *)0)' failed.
cvs [server aborted]: received abort signal

CVS 的设计从来就不是为了处理不区分大小写的文件系统。 它
已经修补到大部分可以工作的程度,但仍然存在
有些地方没有。 这是其中之一。

您可能还想阅读该线程中的其余消息。

Are you on Windows and did you rename a file to the same name with different case (e.g. MAKEFILE vs Makefile vs makefile)? CVS used to have a problem with this (and maybe still does?):

OSDir/mailarchive - Subject: Re: hash.c.312: findnode:

Manu writes:

I try to rename "makefile" to "Makefile" in my cvs tree, then:

cvs: hash.c:312: findnode: Assertion `key != ((void *)0)' failed.
cvs [server aborted]: received abort signal

CVS was never designed to cope with case insensitive file systems. It
has been patched to the point where it mostly works, but there are still
some places where it doesn't. This is one of them.

You might want to read the rest of the messages in the thread as well.

笑脸一如从前 2024-07-12 10:04:57

也许您的存储库上有某种预提交检查,请参阅 这里

Perhaps there is some kind of pre-commit check on your repository, see here

删除会话 2024-07-12 10:04:57

睡眠者写道:

<块引用>

不确定问题是什么,但我通过进入服务器并删除存储库中的文件 Attic/newfile.v 并再次添加它来解决它。

“阁楼”是 CVS 中删除的文件所在的位置。 在过去的某个时刻,有人签入了 newfile.v,但后来它被删除了,因此转移到了阁楼。

通过从存储库中删除 ,v 文件,您损坏了包含文件“newfile”的旧提交。 不要这样做。

正确的方法是恢复已删除的文件,然后用新文件替换其内容。

根据 http://www.cs.indiana.edu/~machrist/笔记/cvs.html

要恢复已从存储库中删除的文件,您实际上需要将该文件更新为其最后的修订版号(在实际删除之前)。 例如:

cvs 更新 -r 1.7 已删除文件

这将恢复工作存储库中的已删除文件。 要查找已删除的文件及其最后的修订号,请在命令提示符下发出 cvs log。

编辑回复评论以解释阁楼中的 ,v 文件的含义。

sleep-er writes:

Not sure what the issue was but I solved it by going onto the server and deleting the file Attic/newfile.v in the repository and adding it again.

The "Attic" is the place where deleted files go in CVS. At some point in the past, someone checked in newfile.v, and at some later point it was deleted, hence moved to the Attic.

By deleting the ,v file from the repository you corrupted older commits that included the file "newfile". Do not do this.

The correct way is to restore the deleted file, then replace its content by the new file.

According to http://www.cs.indiana.edu/~machrist/notes/cvs.html

To recover a file that has been removed from the repository, you essentially need to update that file to its last revision number (before it was actually deleted). For example:

cvs update -r 1.7 deleted_file

This will recover deleted_file in your working repository. To find deleted files and their last revision number, issue cvs log at the command prompt.

Edited in reply to comment to explain what the ,v file in the Attic means.

我为君王 2024-07-12 10:04:57

不确定问题是什么,但我通过进入服务器并删除存储库中的文件 Attic/newfile.v 并再次添加它来解决它。

Not sure what the issue was but I solved it by going onto the server and deleting the file Attic/newfile.v in the repository and adding it again.

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