On Mon, 2007-06-18 at 06:18 -0500, Ben Collins-Sussman wrote:
> On 6/18/07, Richard Carlsson <email@example.com> wrote:
> > We just had a situation which caused some of our developers to start
> > wondering whether they can really trust Subversion at all. One of our
> > lead developers had been preparing an internal release, doing some
> > tagging and switching, and somehow his working copy got broken: one
> > text-base file was not up to date with respect to the repository version
> > that it claimed to be. But everything seemed just dandy, so he created a
> > release package and published it. It was soon discovered that there was
> > a fatal error in the package, and he tracked down the out-of-sync file.
> I think we need more information here. We *do* watch the text-base
> files very carefully for corruption. If you look in the .svn/entries
> file, we store a checksum of each text-base file. This allows us to
> very specifically detect those times when the text-base file randomly
> mutates (perhaps a bad tool changes it, or something.) When that
> happens, you'll see a real text-base checksum error when attempting to
> commit or update, and the operation will abort. You claim that one
> can "manually change a text-base file" and nothing will notice the
> problem, but that's not true. Try it now. I just tried it myself.
A slightly different observation in almost the same context.
The "svn update" command detects the checksum error, if the same file or
any other file in the repository is changed. But it *does not* seem to
detect the checksum error in case there is no change to the repository.
I'm unsure if it is the expected behaviour.
rm -rf textbase-repos textbase-wc
svnadmin create textbase-repos
svn co file:///tmp/textbase-repos textbase-wc
echo 'line 1' > foo
svn add foo
svn commit -m "add foo file"
chmod u+w .svn/text-base/foo.svn-base # corrupting textbase perm
echo 'new line' >> .svn/text-base/foo.svn-base # modifying textbase file
chmod u-w .svn/text-base/foo.svn-base # restoring the perm
svn update # no checksum error
> What you're describing isn't a corruption in the text-base file
> itself, but a corruption of the .svn/entries metadata. I don't even
I think it could be vice-versa as well, either the entries file is
corrupted or, the text-base file is corrupted. If I'm right, the
checksum algorithm we use must detect both of these cases.
Received on Mon Jun 18 13:59:40 2007