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

Tuomo Valkonen tuomov at jolt.modeemi.cs.tut.fi
Wed Feb 23 06:52:04 PST 2005


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.


$ mkdir b
$ cd b
$ ls
$ darcs init
$ echo 1 > foo
$ darcs add foo
$ darcs record -a -m 1
$ cd ..
$ darcs get b b_
$ cd b_
$ darcs tag -m asdf
$ cd ..
$ cd b
$ echo 2 >> foo 
$ darcs record -a -m 2
$ darcs pull -a ../b_/
$ echo 3 >> foo 
$ darcs record -a -m 3
$ darcs optimize --checkpoint
Checkpointing tag:
Wed Feb 23 16:55:00 EET 2005  Tuomo Valkonen <tuomov at iki.fi>
  tagged asdf
Done optimizing!
$ cat _darcs/inventory
[1
Tuomo Valkonen <tuomov at iki.fi>**20050223145500] 
[2
Tuomo Valkonen <tuomov at iki.fi>**20050223145500] 
[TAG asdf
Tuomo Valkonen <tuomov at iki.fi>**20050223145500] 
[3
Tuomo Valkonen <tuomov at iki.fi>**20050223145501]

-- 
Tuomo





More information about the darcs-devel mailing list