8

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

4

6 回答 6

7

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.

于 2012-07-20T11:10:22.323 回答
5

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

于 2011-02-22T08:20:47.357 回答
3

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.

于 2012-08-26T20:26:42.493 回答
1

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.

于 2012-01-10T13:41:53.310 回答
0

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.

于 2013-03-01T06:47:36.193 回答
0
  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.

于 2018-01-17T10:15:13.933 回答