darcs

Patch 320 Make the "error applying hunk" error a lot more readab...

Title Make the "error applying hunk" error a lot more readab...
Superseder Nosy List kowey, mornfall
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-07-27.21:56:34 by mornfall, last changed 2011-05-10.22:06:19 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
make-the-_error-applying-hunk_-error-a-lot-more-readable-_and-useful__.dpatch mornfall, 2010-07-27.21:56:34 text/x-darcs-patch
unnamed mornfall, 2010-07-27.21:56:34
See mailing list archives for discussion on individual patches.
Messages
msg11889 (view) Author: mornfall Date: 2010-07-27.21:56:34
Just a small change I did while debugging darcs-fast-export. (It didn't work
out in the end.)

Yours,
   Petr.

1 patch for repository http://darcs.net/:

Tue Jul 27 23:57:11 CEST 2010  Petr Rockai <me@mornfall.net>
  * Make the "error applying hunk" error a lot more readable (and useful).
Attachments
msg11907 (view) Author: kowey Date: 2010-08-01.19:01:22
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.
msg11909 (view) Author: darcswatch Date: 2010-08-02.00:22:18
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-47fe619185670eb4caba9fe10e735a2c53d04ac9
msg14382 (view) Author: darcswatch Date: 2011-05-10.22:06:19
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-47fe619185670eb4caba9fe10e735a2c53d04ac9
History
Date User Action Args
2010-07-27 21:56:34mornfallcreate
2010-07-27 21:58:03darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-47fe619185670eb4caba9fe10e735a2c53d04ac9
2010-08-01 19:01:22koweysetnosy: + kowey
messages: + msg11907
2010-08-02 00:22:18darcswatchsetstatus: needs-review -> accepted
messages: + msg11909
2011-05-10 22:06:19darcswatchsetmessages: + msg14382