SVN 校验和不匹配的根本原因是什么?

发布于 2024-10-18 07:23:44 字数 241 浏览 2 评论 0原文

几乎每次我提交 SVN 时,我都会收到校验和不匹配错误。我已经知道如何修复它(通过检查文件夹并在删除旧文件夹后复制 .svn 文件夹)。我想知道是什么原因导致了这一切,因为它开始让我发疯。

操作系统:Windows 7 SVN 客户端:VisualSVN、TortoiseSVN

TortoiseSVN 错误消息表明签出副本中存在损坏

Almost every time I commit to SVN I keep getting a checksum mismatch error. I already know how to fix it (by checking out the folder and copying over the .svn folder after deleting the old one). What I want to know is what causes this as its starting to drive me insane.

OS: Windows 7
SVN Client: VisualSVN, TortoiseSVN

TortoiseSVN error message indicating corruption in checked-out copy

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

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

发布评论

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

评论(6

人心善变 2024-10-25 07:23:44

1.重命名工作目录中损坏的文件

2.提交(它将从存储库中删除损坏的文件,并添加重命名的文件)

3.将文件重命名回工作目录中的原始名称

4.

提交 对我来说,工作就像一个魅力,希望有帮助。

1.Rename corrupted file in your working directory

2.Commit (it will delete the corrupted file from repository, and add the renamed one)

3.Rename file back to original name in your working directory

4.Commit

Work like a charm for me, hope it helps.

二货你真萌 2024-10-25 07:23:44

是的,这个错误有点烦人。发生这种情况的原因有多种,比如网络中断、断电或文件损坏。您想出的解决方法是克服此错误的最佳方法afaik..

有关发生此错误的原因和理论的更多详细信息:(类似问题,md5为空;在您的情况下,它的值与服务器上有什么)

修复 SVN 校验和

Yes, this error is a bit annoying.. There are multiple reasons this can occur, say a broken network, power outage, or say file corruption. The workaround you figured out is the best way to get over this error afaik..

More details on the reasons and theory why this error occurs: (similar issue, where the md5 was being null; where as in your case its a different value than whats on the server)

Repair SVN Checksum

哭了丶谁疼 2024-10-25 07:23:44

我不久前遇到的这个解决方案是在问题文件所在的文件夹中打开一个命令外壳并执行以下命令:

svn update --set-depth empty
svn update --set-depth infinity

我不记得在哪里找到了解决方案,我想在到期时给予信任,但我不能请记住,我在 shell 命令历史记录中找到了这个。

This solution I can across a while ago is to open a command shell in the folder where the problem file is located and execute the following:

svn update --set-depth empty
svn update --set-depth infinity

I cannot remember where I found the solution, I would like to give credit where due but I can't remember, I found this in shell command history.

北音执念 2024-10-25 07:23:44

我有一个这样的错误。我发现的最简单的解决方案是删除该文件所在的文件夹,然后在我选择的 svn 客户端中进行更新。

这将从服务器恢复校验和。

当然,唯一的问题是,您在上次提交之前所做的任何更改都将丢失。如果它是一个简单的源文本文件,您可以将整个内容复制到记事本(或任何文本编辑器),更新svn,然后再次将源文本复制到文件中并提交。

I had an error like this. The easiest solution I found, was deleting the folder that the fil was in and then updating in my svn client of choice.

This restores the checksums from the server.

Only problem is, of course, that any changes you've made before that last commit will be lost. If it's a simple source text file, you can copy the whole content to notepad (or whatever text editor), update the svn, then copy the source text into the file again and commit.

青衫儰鉨ミ守葔 2024-10-25 07:23:44

这曾经在 eclipse svn 插件中发生在我身上,我提交了一些文件,然后在进行时单击了取消按钮。然后我得到了和你一样的错误。看起来 svn 服务器已经收到了提交的文件并更新了校验和,但在我的本地 svn 中,文件仍然指向旧的校验和。

我的解决方案是删除/移动包含问题文件的文件夹,然后我再次签出或更新该文件夹。

This once happened to me in eclipse svn plugin, I committed some files and then I clicked cancel button when it's in progress. Then I got error same as yours. It seems the svn server had received the committed files and updated the checksums, but in my local svn, the files are still pointing to old checksums.

My solution is to delete/move the folder that contains problem files, then I checked out or updated again the folder.

影子是时光的心 2024-10-25 07:23:44
  1. 首先,您需要连接SQLite数据库(.svn\wc.db)
  2. 获取文件的校验和:

    从 REPOS_PATH 像“%FILE_NAME%”的节点中选择校验和
    
  3. 您需要删除表 NODES 和 PRISTINE 中的记录:

    从 CHECKSUM = 'CHECKSUM from 2.' 的节点中删除。
    从原始数据中删除,其中校验和 = '来自 2 的校验和。'
    

这对我有用。

  1. First of all, you need to connect SQLite database (.svn\wc.db)
  2. Get checksum of file:

    SELECT CHECKSUM FROM NODES WHERE REPOS_PATH LIKE '%FILE_NAME%'
    
  3. You need to delete record in both table NODES and PRISTINE:

    DELETE FROM NODES WHERE CHECKSUM = 'CHECKSUM from 2.'
    DELETE FROM PRISTINE WHERE CHECKSUM = 'CHECKSUM from 2.'
    

It's worked for me.

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