[PATCH] mail: fix regression introduced in dc6ed2736c81

Kirill Smelkov kirr at landau.phys.spbu.ru
Wed Jan 23 15:18:28 CST 2008


On Wed, Jan 23, 2008 at 09:11:10PM +0100, Christian Ebert wrote:
> * Kirill Smelkov on Wednesday, January 23, 2008 at 22:05:05 +0300
> > # HG changeset patch
> > # User Kirill Smelkov <kirr at mns.spb.ru>
> > # Date 1201115032 -10800
> > # Node ID 92b7c6c80f1d6023cf8cad5d4dd3d440edf54bfb
> > # Parent  28a79c259fcfd52ac6a80696bff612a2dd0be829
> > mail: fix regression introduced in dc6ed2736c81
> 
> This gives a traceback here:
> 
> Traceback (most recent call last):
>   File "/usr/local/bin/hg", line 20, in <module>
>     mercurial.dispatch.run()
>   File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 20, in run
>     sys.exit(dispatch(sys.argv[1:]))
>   File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 29, in dispatch
>     return _runcatch(u, args)
>   File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 45, in _runcatch
>     return _dispatch(ui, args)
>   File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 360, in _dispatch
>     ret = _runcommand(ui, options, cmd, d)
>   File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 413, in _runcommand
>     return checkargs()
>   File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 369, in checkargs
>     return cmdfunc()
>   File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py", line 352, in <lambda>
>     d = lambda: func(ui, repo, *args, **cmdoptions)
>   File "/usr/local/lib/python2.5/site-packages/hgext/patchbomb.py", line 434, in patchbomb
>     sendmail(ui, sender, to + bcc + cc, m.as_string(0))
>   File "/usr/local/lib/python2.5/site-packages/mercurial/mail.py", line 65, in send
>     return func(sender, recipients, msg)
> AttributeError: SMTP instance has no __call__ method

Ugh, buggy me :)
I was fixing the "sendmail" case...

> However, there's something wrong with dc6ed2736c81. It breaks
> patchbomb sending a patch series (1 patch is ok) if my postfix
> relayserver demands smtp-after-pop/imap.
> 
> I thought my relayserver was broken, but now tested with
> patchbomb before this change, and it works.

yep, see above.

Matt, you "cleaned" _sendmail up in dc6ed2736c81 to be just a function,
not a class with similiar interface with smtp. How we should fix it now?

-- 
    Всего хорошего, Кирилл.
    http://landau.phys.spbu.ru/~kirr/aiv/


More information about the Mercurial-devel mailing list