[darcs-users] problem with --sendmail-command

Eric Kow kowey at darcs.net
Mon Oct 6 23:57:07 UTC 2008

On Tue, Oct 07, 2008 at 01:12:32 +0200, Ben Franksen wrote:
> ...or so I thought. I find the code in Darcs.Command.Send resp
> Darcs.Externals.hs very, ahem, hard to understand.

I have always wondered if there was some way we could clean up this
function.  I have a sneaking suspicion that its arguments list is
complicated because of how we call it, and how we call it is complicated
of the arguments list... i.e. that there is some sort of self-cancelling
complexity that we can work on between the two functions.  Maybe one
good refactor would be to generateEmail to a document instead of to a
handle.  I think Florent might be interested in that too.
> Anyway, I /think/ there is a problem in sendEmailDoc calling execSendmail,
> because execSendmail gets a 'fn' argument (last arg) and a /different/
> filename (from yet another invocation of withtempFile) via the ftable
> (index 'a' which I suppose is connected to the %a replacement), /if/
> mbundle is not Nothing. There are all-too-many withTempFile calls there and
> I think filenames for all these temp files got badly mixed up somehow...

So two temp files get created, as I can see.  The 'fn' file is written
to by generateEmail, and the 'a' file contains just the bundle.

Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081007/599a882d/attachment.pgp 

More information about the darcs-users mailing list