[darcs-devel] Re: darcs patch: Checkpoint optimisation fixes.

David Roundy droundy at abridgegame.org
Sun Mar 6 05:32:09 PST 2005


On Sun, Mar 06, 2005 at 11:42:47AM +0000, Tuomo Valkonen wrote:
> On 2005-02-23, Tuomo Valkonen <tuomov at jolt.modeemi.cs.tut.fi> wrote:
> > On 2005-02-23, David Roundy <droundy at abridgegame.org> wrote:
> >> Perhaps the correct thing to do is to first run a
> >> deep_optimize_patchset on the patchset and then consider all the
> >> "lasts" to be candidates for checkpoints? deep_optimize_patchset goes
> >> through and breaks the inventory at any tag at which it *can* be
> >> broken (i.e. where all the preceding patches are included in the tag).
> >
> > How that I know what it does, maybe that would be the thing to do.
> >
> >> I'll wait on applying this until I've heard from you.  I'd also like
> >> to be sure that you've actually run some tests with this before
> >> applying.  Even better would be an addition to the test suite that
> >> break with the current code!
> >
> > The patch seems to work for me. I can now checkpoint tags that are some
> > patches behind in _darcs/inventory, and it correctly splits the
> > inventory if the patch isn't "out of order". In case of out of order
> > patches it generates the checkpoint, but doesn't split the
> > inventory. Maybe that would work for tags in other inventories too, but
> > I didn't dare to venture there. get --partial won't work on such a
> > checkpoint, though.
> 
> I did some further testing on this after also trying the
> deep_optimize_patchset solution... and there infact is a problem.  All is
> fine if you optimize the latest tag, wherever it is, but if you try to
> optimize an earlier patch, within _darcs/inventory, it infact breaks the
> inventory at the latest patch, but generates the checkpoint file for the
> selected patch.

I'm not sure why that's a problem... unless darcs get somehow fails in that
situation, but fundamentally if you use the deep_optimize_patchset, your
checkpoint ought to be valid, and the bug would be in get, not in optimize.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list