[darcs-devel] get command

Ian Lynagh igloo at earth.li
Fri Apr 15 06:02:25 PDT 2005


On Fri, Apr 15, 2005 at 08:30:00AM -0400, David Roundy wrote:
> 
> In the case of a local non-partial get, we don't need to apply any patches
> at all, but we do two slurps, so that we will avoid holding junk in
> memory.

Isn't reading and writing a slurpy applying patches?
Oh, wait, slurp_recordeds calls surely_slurpInfinitePristines which
sounds like it just reads _darcs/current? Surely that's not safe - what
if a patch is applied in the mean time? I can't see an obvious lock
being taken, and we may not even have permissions to take one AFAICT.

Anyway, I now see why in the remote case it makes sense to apply patches
first and then slurp second; I had misunderstood what the slurping meant.
(I think it would be slightly nicer to apply to current and then slurp
the other way, but that's a minor point).

> Are you suggesting that we can get by with a single slurp, which
> we lazily write to two locations simultaneously?

No, I'm not interested in that level of optimisation over
clarity/simplicity at the moment.


Thanks
Ian





More information about the darcs-devel mailing list