[darcs-devel] Unfinished stdin default patch

Marc Weber marco-oweber at gmx.de
Sun Apr 20 00:19:32 UTC 2008


Darcs has had a small bug:
It was allowed to 
darcs send --sedmail-command "fakescript"
and it told you  "succesfully send mail" without passing the
attachements! (%a)

This patch fixes it for darcs send
http://mawercer.de/stdin_default_patch
but I've written a fat warning "unfinished" because I'm not sure what
about darcs apply --reply --sendmail-commnand

I'm struggling because I don't understand
this part in sendMailDoc yet

     ftable' <- case mbundle of
                Just (content,bundle) ->
                  withOpenTemp $ \(hat,at) -> do
                    hPutDocLn hat $ bundle
                    hClose hat
                    return [ ('b', renderString content) , ('a', at) ]
                Nothing ->
                    return [ ('b', renderString body) ]

In Apply.lhs 
        (Just (empty,empty))
is passed to sendMailDoc so the Just case will be used \
(renderString content)
Why is an empty content and bundle used here?
Why not use the Nothing case?

Marc Weber


More information about the darcs-devel mailing list