Hi all (but especially Ian),

I seem to remember a patch by Ian, but can't find it in any of my
mailboxes, and it's not in the darcs-unstable tree, so I'm wondering if any
of you remember it or have it.

It was from when we were working on the bug that showed up when pulling a
patch that removed a binary file.  There was a problem with the order in
which we wrote pending, since writing pending required reading the pristine
cache.  Ian had a clever trick (which he counter-proposed to my solution)
which involved a higher-order write_pending function that wrote a temporary
pending file, and then checked later to see if it was valid.

Does anyone have a copy of this patch? And Ian, is there a reason you
didn't apply it?

I have a feeling that bug #465 may be related to this issue.  Although it
hasn't been reproduced, the particular buggy pending is suggestive, and I
wonder if the fact that we're writing pending after we update the pristine
cache could be throwing us off.  I do believe this is the wrong order, in
that the lazy

      mp <- get_unrecorded repository (AnyOrder:opts)

may give an unexpected result when we finally write the pening:

          unless (isNothing mp && pw_resolved `eq_patches` pc) $
               write_pending repository $ join_patches
                   [invert pc, fromMaybePatch mp, pw_resolved]

My solution was a touchPatch function to be called before modifying
pristine.  Ians seemed nicer (although rather complex), but as I say, I've
lost it.  Thanks!
-- 
David Roundy
http://www.darcs.net

_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to