[darcs-users] darcs patch: Add forceHashSlurped that hashes the slu... (and 1 more)
Petr Rockai
me at mornfall.net
Mon Sep 1 14:39:10 UTC 2008
Hi,
"David Roundy" <daveroundy at gmail.com> writes:
> It sounds to me like this is a bug in hashSlurped that should be
> fixed. hashSlurped should always work right, which shouldn't be too
> hard. We just have to check that the hash files referred to in Just
> <hash> are present in the subdirectory of _darcs/ that we're writing
> to. It's a quick check (just a doesFileExist) in the common case
> where it's already present, and it should be able to ensure that this
> kind of bug won't happen.
yes, I just have been hesitant to do that, as it is likely to add a few
thousand stat calls (well, as many as there are files in the repo) to most
repository-altering operations. On the other hand, it's likely the metadata is
all in OS cache at that time, so it might not affect things adversely.
However, there is another issue with that approach. If we encounter hash
failures in pristine, we might want repair to fix those -- which it will under
forceHashSlurped as proposed, but won't under hashSlurped with a doesFileExist
call in it.
It's probably your call whether that is desirable functionality or not.
Yours,
Petr.
--
Peter Rockai | me()mornfall!net | prockai()redhat!com
http://blog.mornfall.net | http://web.mornfall.net
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton on the subject of C program indentation
More information about the darcs-users
mailing list