Re: How to recover from a "checksum mismatch"
From: Ryan Schmidt <subversion-2010a_at_ryandesign.com>
Date: Sun, 21 Feb 2010 08:37:00 -0600
On Feb 21, 2010, at 06:26, Gregory Berkolaiko wrote:
> Let's say
Well, to the Subversion mindset, that's the only thing that's relevant, since Subversion assumes nobody changes the contents of the .svn directories except Subversion, and that Subversion always modifies the contents of the .svn directories correctly. The latter assumption could of course be false if there is a bug in Subversion, but if so, that should be reported and fixed. Since Subversion has been around for awhile, I hope the number of outstanding bugs in its handling of basic functions like the .svn directories is very small.
> The problem is that now the working copy is in an
Correct...
> and svn revert should restore it to a working state.
Not necessarily. That's not exactly what "svn revert" means.
> Here are the commands I use (assuming README is underthe version control):
Now your working copy is broken and should be repaired manually. For example you could check out a fresh working copy and copy that text-base file from the fresh working copy into the same place within the broken working copy.
It might be nice if Subversion offered an automated way to repair the content of .svn directories. However, there's probably not much need to: Subversion currently assumes the .svn directories do not get corrupted, which is not such an unreasonable assumption: a checksum error or other corruption in the .svn directories either indicates the user modified it, which is a user error; or a bug in Subversion, which should be reported and fixed; or a hardware error such as a bad hard drive, which the user should fix.
> Suppose I am to give up on my changes:
It is correct that the purpose of the revert command is to copy a file from the text-base to the main working copy area. I don't know the source code, but as a user it surprises me a little that Subversion didn't verify the integrity of the text-base file using its checksum before doing so. I'm not totally surprised that "svn up" shortcuts to getting the file from the text-base when it's available there.
> There should be a way to revert the cached version too!
Perhaps Subversion will pull it from the repository if you delete it from the text-base and then update. If not, deleting the entire directory containing the problem file and then updating again should definitely do so.
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.