On Tue, Jul 27, 2010 at 21:56:34 +0000, Petr Ročkai wrote:
> Just a small change I did while debugging darcs-fast-export. (It didn't work
> out in the end.)
Applied, thanks!
Make the "error applying hunk" error a lot more readable (and useful).
----------------------------------------------------------------------
> - Nothing -> fail $ "Error applying hunk " ++
> + Nothing -> fail $ "### Error applying:\n" ++
> (renderString $ showHunk NewFormat f line old new) ++
> hunk ./src/Darcs/Patch/Apply.lhs 186
> - " to file " ++ fn2fp f ++ ": " ++ show ps
> + "\n### to file " ++ fn2fp f ++ ":\n" ++ BC.unpack ps
This does seem like an improvement indeed, although we may want to be
careful about getting a kind of consistency in how we report things.
Note also that you may be able to use ColourPrinter to some effect;
I think the darcs-2 internal stuff uses red to mark some stuff up.
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
|