<p>I'm using subclipse in Flex Builder 3, and recently received this error when trying to commit:</p>

<p><code>svn: Checksum mismatch for '/Users/redacted/Documents/Flex Builder 3/path/to/my/file.mxml'; expected: 'f8cb275de72776657406154dd3c10348', actual: 'null'</code></p>

<p>I worked around it by:</p>

<ol>
<li>Committing all the other changed files, omitting the troublesome one.</li>
<li>Copying the contents of the trouble file to a TextMate window</li>
<li>Deleting my project in FlexBuilder/Eclipse</li>
<li>Checking my project out fresh from SVN</li>
<li>Copying the text of the trouble file back in from the TextMate Window</li>
<li>Committing the changes.</li>
</ol>

<p>It worked, but I can't help but think there's a better way. What's actaully happening to cause the svn:checksum error, and what's the best fix.</p>

<p>Maybe more important -- is this a symptom of a greater problem?</p>

[{'answer_id': 6144, 'author': 'Lasse V. Karlsen', 'author_id': 267, 'author_profile': 'https://Stackoverflow.com/users/267', 'pm_score': 6, 'selected': True, 'text': "<p>The file in the .svn directory that keeps track of what you have checked out, when, what revision, and from where, has gotten corrupted somehow, for that particular file.</p>\n\n<p>This is no more dangerous or critical than the normal odd file problem, and can be because of various problems, like a subversion program dying mid-change, power-disruption, etc.</p>\n\n<p>Unless it happens more I wouldn't make much out of it.</p>\n\n<p>It can be fixed by doing what you did, make a copy of your work-files, check out a fresh copy, and add the modified files back in.</p>\n\n<p>Note that this might cause problems if you have a busy project where you would normally have to merge in changes.</p>\n\n<p>For instance, you and a collegue both check out a fresh copy, and start working on the same file. At some point, your collegue checks in his modifications. When you attempt to do the same, you get the checksum problem you have. If you now make copies of your changed files, do a fresh checkout, then subversion will lose track of how your changes should be merged back in.</p>\n\n<p>If you didn't get the problem in this case, when you got around to checkin in your modifications, you would need to update your working copy first, and possibly handle a conflict with your file.</p>\n\n<p>However, if you do a fresh checkout, complete with your collegues changes, it now looks like you removed his changes and substituted with your own. No conflicts, and no indications from subversion that something is amiss.</p>\n"}, {'answer_id': 6509, 'author': 'Polsonby', 'author_id': 137, 'author_profile': 'https://Stackoverflow.com/users/137', 'pm_score': 3, 'selected': False, 'text': "<p>I occasionally get similar things, usually with files that nobody has been near in weeks. Generally, if you know you haven't been working in the directory in question, you can just delete the directory with the problem and run </p>\n\n<pre><code>svn update\n</code></pre>\n\n<p>to recreate it.</p>\n\n<p>If you have live changes in the directory then as lassevk and you yourself suggested, a more careful approach is required.</p>\n\n<p>Generally speaking I would say it's a good idea not to leave edited files uncommitted, and keep the working copy tidy - don't add a whole bunch of extra files into the working copy that you aren't going to use. Commit regularly, and then if the working copy goes tits up, you can just delete the whole thing and start over without worrying about what you might or might not be losing, and without the pain of trying to figure out what files to save.</p>\n"}, {'answer_id': 477366, 'author': 'Andrew Hedges', 'author_id': 11577, 'author_profile': 'https://Stackoverflow.com/users/11577', 'pm_score': 3, 'selected': False, 'text': '<p>Just today, I managed to recover from this error by checking out a copy of the corrupted directory to /tmp and replacing the files in .svn/text-base with the just co\'ed ones. I wrote up the procedure in some detail <strong><a href="http://andrew.hedges.name/blog/2009/01/25/how-to-recover-from-checksum-mismatch-errors-in-svn" rel="noreferrer">here on my blog</a>.</strong> I\'d be interested to hear from more experienced SVN users what are the advantages and disadvantages of each approach.</p>\n'}, {'answer_id': 477726, 'author': 'myron-semack', 'author_id': 21962, 'author_profile': 'https://Stackoverflow.com/users/21962', 'pm_score': 4, 'selected': False, 'text': '<p>SVN keeps pristine copies of all the files you checkout buried in the .svn directories.  This is called the text-base.  This allows for speedy diffs and reverts.  During various operations, SVN will do checksums on these text-base files to catch file corruption issues.</p>\n\n<p>In general, an SVN checksum mismatch means a file that shouldn\'t have been altered was changed somehow.  What does that mean?</p>\n\n<ol>\n<li>Disk corruption (bad HDD or IDE cable)</li>\n<li>Bad RAM</li>\n<li>Bad network link</li>\n<li>Some kind of background process altered a file behind your back (malware)</li>\n</ol>\n\n<p>All of these are bad.</p>\n\n<p><strong>HOWEVER</strong>, I think your problem is different.  Look at the error message.  Note that it expected some MD5 hashes, but instead got back \'null\'.  If this were a simple file corruption issue, I would expect that you would have two different MD5 hashes for the expected/got.  The fact that you have a \'null\' implies that something else is wrong.</p>\n\n<p>I have two theories:</p>\n\n<ol>\n<li>Bug in SVN.</li>\n<li>Something had an exclusive lock on the file, and the MD5 couldn\'t happen.</li>\n</ol>\n\n<p>In the case of #1, try upgrading to the latest SVN version.  Maybe also post this on the svn-devel mailing list (<a href="http://svn.haxx.se" rel="noreferrer">http://svn.haxx.se</a>), so the developers can see it.</p>\n\n<p>In the case of #2, check to see if anything has the file locked.  You can download a copy of Process Explorer to check.  Note that you probably want to see who has a lock on the <strong>text-base</strong> file, not the actual file you were trying to commit.</p>\n'}, {'answer_id': 579442, 'author': 'Sander Rijken', 'author_id': 5555, 'author_profile': 'https://Stackoverflow.com/users/5555', 'pm_score': 4, 'selected': False, 'text': "<p>There's also a simpler cause for this  than just bugs, or disk corruption etc. I think it the most likely cause for this to happen is when someone writes a recursive text replacement on the working copy, without excluding .svn files.<br>\nThis means the pristine copies of the files (basically the BASE version of the files, that's stored inside the .svn administrative area) get modified, and that invalidates the MD5 sum.</p>\n\n<p>@Andrew Hedges: that also explains why your solution fixes this.  </p>\n"}, {'answer_id': 620006, 'author': 'aaron', 'author_id': 74837, 'author_profile': 'https://Stackoverflow.com/users/74837', 'pm_score': 2, 'selected': False, 'text': '<p>try:\nsvn up --force file.c</p>\n\n<p>This worked for me without having to do anything extra</p>\n'}, {'answer_id': 1095327, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>Had this issue, our dev VM\'s are all *nix our workstations win32.\nsome fool(s) created files of the same name (different case) on the *nix box\nall of a sudden checkouts on Win32 blows up... \nbecause win doesn\'t know which of the 2 files of the same name to MD5 against, \ncheckouts on *nix were fine... leaving us to scratch our heads for a bit</p>\n\n<p>I was able to update the repo on the win box by copying the ".svn" folders over from a *nix box with a good working copy. have yet to see if the repo can be cleaned to the point where we can do a full checkout again</p>\n'}, {'answer_id': 1771570, 'author': 'jsh', 'author_id': 132408, 'author_profile': 'https://Stackoverflow.com/users/132408', 'pm_score': 2, 'selected': False, 'text': '<p>Another, possibly even scarier, workaround for checksum conflicts I found is as follows:</p>\n\n<p><strong>CAVEAT:</strong> Make sure your local copy is the best known version, AND that anyone else on your project knows what you\'re doing!  (in case this wasn\'t obvious already).</p>\n\n<p>if you know your local copy of the file is "the good one" you can directly delete the file from the SVN server and then force commit your local copy.  </p>\n\n<p>syntax for direct deletion:</p>\n\n<pre><code>svn delete -m "deleting corrupted file XXXX" \nsvn+ssh://username@svnserver/path/to/XXXX\n</code></pre>\n\n<p>good luck!</p>\n\n<p>J</p>\n'}, {'answer_id': 2766697, 'author': 'hwjp', 'author_id': 366221, 'author_profile': 'https://Stackoverflow.com/users/366221', 'pm_score': -1, 'selected': False, 'text': "<p>here's how i fixed the issue - v simple, but as per jsh above, need to be sure your copy is the best one.</p>\n\n<p>simply</p>\n\n<ol>\n<li>make a copy all problem files, in the same folder.</li>\n<li>delete the old ones with svn rm</li>\n<li>commit. </li>\n<li>then rename the copies back to the original file names.</li>\n<li>commit again.</li>\n</ol>\n\n<p>suspect this probably kills all sorts of revision history on that file, so it's a pretty ugly way to go about it...</p>\n"}, {'answer_id': 5912499, 'author': 'Denis Barmenkov', 'author_id': 116373, 'author_profile': 'https://Stackoverflow.com/users/116373', 'pm_score': 2, 'selected': False, 'text': '<p>I\'ve observed a lot of solutions from patching .svn/entries file to fresh checkout.</p>\n\n<p>It can be a new way (thank to my collegue):</p>\n\n<pre><code>- go to work directory where recorder/expected checksum issue occured\n- call "svn diff" and make sure that there isnt any local modifications\n- cd ..\n- remove trouble file\'s directory with "rm -rf"\n- issue "svn up" command, svn client will restore new fresh files copies\n</code></pre>\n'}, {'answer_id': 6532241, 'author': 'Arturas Smorgun', 'author_id': 63912, 'author_profile': 'https://Stackoverflow.com/users/63912', 'pm_score': 2, 'selected': False, 'text': '<p>Matt, there is easier way than you described - modifying checksum in .svn/entries file. Here is full description:\n<a href="http://maymay.net/blog/2008/06/17/fix-subversion-checksum-mismatch-error-by-editing-svnentries-file/" rel="nofollow">http://maymay.net/blog/2008/06/17/fix-subversion-checksum-mismatch-error-by-editing-svnentries-file/</a></p>\n'}, {'answer_id': 8917734, 'author': 'Alexandre', 'author_id': 1157212, 'author_profile': 'https://Stackoverflow.com/users/1157212', 'pm_score': 1, 'selected': False, 'text': "<p>One other easy way....</p>\n\n<ol>\n<li>Update your project to get latest version</li>\n<li>checkout the same version in an other folder</li>\n<li>replace .svn folder from the new checkout to the working copy  ( i've replaced .svn-base files )</li>\n</ol>\n"}, {'answer_id': 10291990, 'author': 'Mike', 'author_id': 448078, 'author_profile': 'https://Stackoverflow.com/users/448078', 'pm_score': 0, 'selected': False, 'text': '<ol>\n<li>Check out only folder with problematic file from repository to some other location.</li>\n<li>Make sure <code>.svn\\text-base\\&lt;problematic file&gt;.svn-base</code> is identical to one checked out.</li>\n<li>Make sure problematic file section <em>(all lines of the section)</em> in <code>.svn\\entries</code> is identical to one checked out.</li>\n</ol>\n'}, {'answer_id': 14261173, 'author': 'Jeroen', 'author_id': 271204, 'author_profile': 'https://Stackoverflow.com/users/271204', 'pm_score': 0, 'selected': False, 'text': "<p>You won't believe this, but I have actually fixed my error by removing the <code>&lt;scm&gt;...&lt;/scm&gt;</code> stance from the offending pom.xml file I was hoping to check in. It contained the URL of the subversion repository it is checked in (this is what the Maven setting is for!), but somehow it generated a faulty checksum for the file while checking in.</p>\n\n<p>I literally tried all aforementioned methods of fixing this, but to no avail. Did I encounter a very rare situation in where the checksum generator is not robust enough?</p>\n"}, {'answer_id': 16141964, 'author': 'harsh', 'author_id': 878732, 'author_profile': 'https://Stackoverflow.com/users/878732', 'pm_score': 0, 'selected': False, 'text': "<p>I also stumbled upon this issue and was trying to look for quick solutions, tried some of the solution given in this thread.\nThis is how I resolved this issue in my development environment (to me it was minimal change):</p>\n\n<p>1- Locally deleted directory in which the file got corrupted (WEB-INF):</p>\n\n<pre><code> svn: Checksum mismatch for 'path-to-folder\\WEB-INF\\web.xml':\n   expected:  d60cb051162e4a6790a3ea0c9ddfb434\n     actual:  16885ded2cbc1adc250e4cbbc1427546\n</code></pre>\n\n<p>2- Copied and pasted directory (WEB-INF) from a fresh checkout </p>\n\n<p>3- Did svn up, now Eclipse/TortoiseSVN started showing conflict in this directory</p>\n\n<p>4- Marked conflict as Resolved</p>\n\n<p>This worked, I was able to update, commit earlier corrupted web.xml</p>\n"}, {'answer_id': 16605268, 'author': 'HotJard', 'author_id': 1503855, 'author_profile': 'https://Stackoverflow.com/users/1503855', 'pm_score': 0, 'selected': False, 'text': "<p>In my case the sum was different. All I've done was:</p>\n\n<p>1) Make Check Out to separate folder</p>\n\n<p>2) Replace by file from this folder in .svn directory with my project problem-file which was said in svn-client error message </p>\n\n<p>3) ..Profit!</p>\n"}, {'answer_id': 17531416, 'author': 'Matija Han', 'author_id': 1795317, 'author_profile': 'https://Stackoverflow.com/users/1795317', 'pm_score': 2, 'selected': False, 'text': '<p>As an alternative to checking out a fresh copy (which I also had to do after trying all other options) and than merging all your changes which you previously saved backed into it, the following approach worked the same way, but saved me a considerable amount of time, and possibly some errors:</p>\n\n<ol>\n<li>Check out a fresh working copy</li>\n<li>Copy .svn folder from you fresh copy into your corrupt copy</li>\n<li>Voila</li>\n</ol>\n\n<p>Of course, you should backup your original corrupt working copy just in case. In my case, I was free to remove it after I was done, as everything went fine.</p>\n'}, {'answer_id': 17944947, 'author': 'Dolen Oinam', 'author_id': 2633734, 'author_profile': 'https://Stackoverflow.com/users/2633734', 'pm_score': 0, 'selected': False, 'text': '<ol>\n<li>Go to the folder causing problem</li>\n<li>Execute command <code>svn update --set-depth empty</code></li>\n<li>This folder will empty and revert the empty folder</li>\n<li>Sync with the svn and update.</li>\n</ol>\n\n<p>This work for me.</p>\n'}, {'answer_id': 24186429, 'author': 'S.V.P.Reddy', 'author_id': 3734372, 'author_profile': 'https://Stackoverflow.com/users/3734372', 'pm_score': 2, 'selected': False, 'text': '<p>This will happens when the .svn folder corrupted.\nSolution:\nRemove the entire folder of the file contains and checkout the folder again.</p>\n'}, {'answer_id': 24737533, 'author': 'Torben Lajer', 'author_id': 2550568, 'author_profile': 'https://Stackoverflow.com/users/2550568', 'pm_score': 0, 'selected': False, 'text': "<p>Although this is an old issue, I thought I would give my 2 cents as well, since Ive just wrestled with the problem for more than an hour.</p>\n\n<p>The solutions above either didn't work for me, or seemed over-complicated.</p>\n\n<p>My solution was simply to remove all svn folders from the project.</p>\n\n<p><code>find . -name .svn -exec rm -rf {} \\;</code></p>\n\n<p>After this, I did simple checkout of the project again. Thus leaving all my un-committed files intact, but still got a rebuild of all the svn files.</p>\n"}, {'answer_id': 25396809, 'author': 'mohammad sadeq', 'author_id': 3958714, 'author_profile': 'https://Stackoverflow.com/users/3958714', 'pm_score': 0, 'selected': False, 'text': '<p>I had this problem on ubuntu 14.04 and solve it by follow steps:</p>\n\n<ol>\n<li>$ cd /var/www/myProject</li>\n<li>$ svn upgrade</li>\n<li>$ svn update</li>\n</ol>\n\n<p>after these steps i could commit file without error.</p>\n'}]
['https://Stackoverflow.com/questions/6130', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/763/']