On Tue, Dec 23, 2008 at 08:57:26 +0100, Petr Rockai wrote: > Tue Dec 23 08:47:02 CET 2008 Petr Rockai <[email protected]> > * Add a rudimentary test for repair of a corrupt repository.
I applied the resent version of this patch (perhaps send --in-reply-to would have been good here) > Tue Dec 23 08:47:54 CET 2008 Petr Rockai <[email protected]> > * Fix a memory leak in Darcs.Repository.Repair. > > The way we repaired patches forced the whole repository into memory. We now > only store patches that we have actually changed and "zip" them back into > the > repository using replaceInFL. Fix a memory leak in Darcs.Repository.Repair. --------------------------------------------- > +replaceInFL :: FL (PatchInfoAnd a) > + -> FL (PatchInfoAnd a, PatchInfoAnd a) > + -> FL (PatchInfoAnd a) > +replaceInFL orig NilFL = orig > +replaceInFL NilFL _ = impossible > +replaceInFL (o:>:orig) ch@((o',c):>:ch_rest) > + | info o == info o' = c:>:replaceInFL orig ch_rest > + | otherwise = o:>:replaceInFL orig ch Another thought I had: Would it make sense here to use plain old [] instead of FL for the list of modified patches? The idea is that we don't want to wrongly imply that the latter is a successive sequence of patches. Unless I misunderstand the Sealed stuff, this also sounds like a place where we'd want something like Sealed2. CC'ing Jason in case he wants to add to that. -- Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow> PGP Key ID: 08AC04F9
signature.asc
Description: Digital signature
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
