Updating the patch index is reading too far back in history, which is slow and
won't interact well with lazy repos.
I first noticed this problem with amend-record but it probably exists with any
command that adds or changes local patches.
The problem can be seen by working on a repository where the files in
_darcs/inventories have been removed, and trying to amend-record a patch that's
after the last clean tag. Without the patch index, darcs correctly updates the
path without needing to visit the missing inventories. With the patch index it
tries to read them and crashes. (As well as deleting the inventories from the
local repo, they need to be deleted from the global cache or darcs just finds them
again there).
I'll send a test case to illustrate this directly.
|