On Thu, Aug 11, 2005 at 12:10:17AM +0100, Ian Lynagh wrote: > > Hi all, > > darcs get http://cvs.haskell.org/darcs/cabal > > is behaving differently with 1.0.3 and unstable (i.e. _darcs/current is > different depending on which you use). This probably means there is > some detail wrong with the more efficient apply code, but unfortunately > I won't have time to look at it quite yet.
Argh. That's an annoying bug. I've got a fix (which I'll send in soon) that fixes the problems that show up in the cabal repository, but I think there may still be problems with patches that delete the end of a file and then replace with a new end (in separate hunks). A different fix (and perhaps both simpler and more correct) might be to coalesce before applying, which would eliminate overlapping or touching hunks. > Although one option would be to revert to the old code and ignore the > inefficiency until the new hunk format comes, we have to solve this > problem anyway in order to convert old hunks to new hunks, so I don't > think this would really gain us much. I'd definitely prefer to fix the new code. > (also useful would be tests of getting repos with various corner case > patches in, e.g. creating empty files, files with a single '\n', > emptying files, removing all but a newline from files, etc. The > interesting files to switch back and forth between are probably > "" "\n" "foo" "foo\n" "foo\nbar" "foo\nbar\n" "bar\nfoo" "bar\nfoo\n"). Yeah, it would be great if someone were to code up some test cases. The trick is that we'd need to be sure to pull rather than getting the patches, since local gets won't actually use apply. We could alternately use check to test for this behavior. -- David Roundy http://www.darcs.net _______________________________________________ darcs-devel mailing list [email protected] http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
