darcs

Issue 1906 darcs check should recalculate hashed of pristine files to catch empty/corrupted files

Title darcs check should recalculate hashed of pristine files to catch empty/corrupted files
Priority feature Status needs-reproduction
Milestone Resolved in
Superseder Nosy List dmitry.kurochkin, gh, kowey
Assigned To gh
Topics

Created on 2010-08-06.21:01:23 by gh, last changed 2010-08-07.10:53:12 by kowey.

Messages
msg12007 (view) Author: gh Date: 2010-08-06.21:01:22
Quoting Petr from http://bugs.darcs.net/issue1903:

=====
That's indeed interesting... if I remove a file from pristine.hashed
manually and then darcs check, it indeed complains...

Ok, I see: check is only consulting the pristine hashes, not the file
contents themselves. So even though it can't look into the hashed file
that's missing, it has its hash and concludes it's the right file (since
the hash matches).

It may be worth making the checking stricter (i.e. apart from checking
that hashes are OK, also check for each pristine file, that the hash
corresponds to the content of the file...).
=====

One way to reproduce that bug would be to "darcs get" a repos that has 
some files unreadable because of bad permissions.

What happened in my case was that a repo printed an error during a 
"darcs get" (couldn't fetch), but then "darcs check" would not complain 
(repo is consistent), and then doing obliterate would trigger a 
mysterious Zlib error.
msg12017 (view) Author: kowey Date: 2010-08-07.10:53:03
Guillaume, may I farm out the regression test task to you?
See http://wiki.darcs.net/Development/RegressionTests
History
Date User Action Args
2010-08-06 21:01:23ghcreate
2010-08-07 10:53:04koweysetpriority: feature
status: unknown -> needs-reproduction
messages: + msg12017
nosy: + kowey
2010-08-07 10:53:12koweysetassignedto: gh