darcs

Issue 2186 apply --reply is broken

Title apply --reply is broken
Priority bug Status given-up
Milestone 2.12.0 Resolved in
Superseder Nosy List ilya
Assigned To
Topics Regression

Created on 2012-04-27.19:57:55 by ilya, last changed 2017-07-31.01:56:06 by gh.

Messages
msg15624 (view) Author: ilya Date: 2012-04-27.19:57:54
Hi,

apply --reply is mostly broken. If a patch fails (e.g. because of a
conflict), function "sendit" in "redirectOutput" concatenates the error
message to the output file name instead of writing the message to the file:
               sendit tempf e =
                do sendSanitizedEmail opts f to "Darcs error applying
patch!" cc $
                             tempf ++ "\n\nCaught exception:\n"++
                             show e++"\n"
                   throwIO ExitSuccess

If a patch is applied successfully, no email is sent, because "sendit"
is only called from the exception handler. It looks like
"redirectOutput" expects "applyItNow" to call "exitWith ExitSuccess" at
the end.

Ilya
msg15636 (view) Author: kowey Date: 2012-04-30.07:45:09
Any chance you could help us with a test case?
http://wiki.darcs.net/Development/RegressionTests
msg15720 (view) Author: kowey Date: 2012-05-26.06:31:38
Hey, thanks for following up with tests, Ilya!  I wonder where this 
regressed (ie. if we can track down the darcs version where it was last 
known working).  Would be a bit reassuring to find one, but seems just 
as broken in darcs 2.5 (I had to tweak the test because --patch-name was 
renamed to --name due to issue1883, sigh)

Looks like Ilya has provided a diagnosis, so I think we just need a 
patch now.
msg17969 (view) Author: bf Date: 2015-01-31.20:17:03
This should be fixed in 2.10. I have tried to find out why apply does
not send any mail but without success so far.
History
Date User Action Args
2012-04-27 19:57:55ilyacreate
2012-04-30 07:45:10koweysetstatus: unknown -> needs-testcase
messages: + msg15636
2012-05-26 06:31:40koweysetstatus: needs-testcase -> needs-implementation
topic: + Regression
messages: + msg15720
2015-01-31 20:17:05bfsetmessages: + msg17969
milestone: 2.10.0
2015-04-18 17:39:53ghsetmilestone: 2.10.0 -> 2.12.0
2017-07-31 01:56:06ghsetstatus: needs-implementation -> given-up