[darcs-devel] darcs patch: Remove redundant sift_for_pending (and 1 more)

David Roundy droundy at abridgegame.org
Wed Jun 22 05:28:07 PDT 2005


On Wed, Jun 22, 2005 at 04:34:42AM +0100, Ian Lynagh wrote:
> 
> Do you have any comments about this for a solution to #323?

Looks mostly all right.  My biggest concern (and I haven't actually applied
it, so I don't see all the context) is that it looks like the update of the
inventories is now further from the application to pristine.  I'd rather
put them adjacent to minimize the danger of repository corruption due to
power outage or kill -9.

In a side note, perhaps we should add some sort of corruption-lock to the
repository, which would exist while we're updating the pristine cache, and
would be removed by repair? It'd be more than the existing lock, since it's
very easy to kill darcs and leave the lock behind, and usually you just
want to remove the lock by hand.  But if one leaves the corruption marker
behind, one really ought to run darcs repair, since there'd be a high
probability of corruption in that case.

> (the problem is that we first apply the patch to pristine, then the
> actual diff of pristine and working happens. This just applies to
> pristine first, with a bit of fiddling to make the valid pending check
> succeed. Would probably need to be done in another place or two too.)

If I understand properly, the trick you used was to write the pending patch
*first* and then after the pristine cache has been updated check whether
the pending patch is actually valid? That's a clever trick.  I hadn't
thought of separating the two like that, which is why I had to go for my
touch_patch business.

I do think that we still need to track down that bus error, right? Although
this fixes a real bug, we still have another real bug that I'd like to
find.  I would do it this weekend, except that I've got a conference.  :(
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list