签入时出现CVS错误
时间:2020-03-05 18:55:23 来源:igfitidea点击:
当尝试在添加新文件后提交到cvs分支时,出现此错误
Assertion failed: key != NULL, file hash.c, line 317
任何想法如何解决它,以便我可以签入我的代码吗?
服务器和客户端都是Linux,并且涉及预提交。
解决方案
回答
也许存储库中有某种预提交检查,请参见此处
回答
我们是否在Windows上,并且是否将文件重命名为大小写不同的同名文件(例如MAKEFILE,Makefile和Makefile)? CVS曾经对此有问题(也许仍然存在?):
OSDir / mailarchive主题:回复: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.
我们可能还希望阅读线程中的其余消息。
回答
不知道是什么问题,但是我通过进入服务器并删除存储库中的Attic / newfile.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.
"阁楼"是CVS中删除文件的位置。在过去的某个时候,有人签入了newfile.v,后来又将其删除了,因此移到了Attic。
通过从存储库中删除.v文件,我们破坏了包含文件" newfile"的较早的提交。不要这样做。
正确的方法是还原已删除的文件,然后将其内容替换为新文件。
根据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.
编辑以回应评论,以解释Attic中的.v文件的含义。