Hi,

"Eric Kow" <[EMAIL PROTECTED]> writes:
> Ok.  Petr, I think the most helpful thing here is if you could
> motivate the forceHashedSlurp stuff.
So, as I have already explained (see
http://lists.osuosl.org/pipermail/darcs-users/2008-August/012966.html) -- but
let's try to put things in different words, as we discussed the issue on IRC:

slurpHashed will take a "hashed" directory and produce an appropriate
SlurpDirectory (files coming from drive in it will have the "Maybe String"
field in them set to Just <hash>)

hashSlurped will take a SlurpDirectory (possibly modified through the
WriteableDirectory interface to SlurpMonad -- files produced this way will have
the Maybe String field set to Nothing) and write out any files, that have their
"Maybe String" set to Nothing.

This means, that hashSlurped is appropriate in these two scenarios:
- SlurpDirectory has been obtained from a non-hashed slurping action
- SlurpDirectory has been obtained from slurpHashed and the directory parameter
  to hashSlurped matches that passed to slurpHashed

However, the repair code as it is introduces a situation, where hashSlurped is
not appropriate:

- SlurpDirectory has been obtained from slurpHashed, but hashSlurped is being
  called on a different directory -- we basically want to copy the hashed
  subdirectory to a new location

This is where forceHashSlurped comes into play, as it implements the last
scenario, without changing behaviour of hashSlurped. It could probably get a
better name, but so could hashSlurped -- although maybe a wider refactor would
be in place, to enforce that hashSlurped can't be used in the 3rd problematic
case described above.

Hopefully, this time the explanation is clear enough and we can move on --
either renaming the functions or doing something else, but actually moving
towards fixing issue971...

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
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to