hgext/patchbomb.py
changeset 36449 a918c996a881
parent 36448 39c9f339b692
child 36450 d478c8cd89d1
equal deleted inserted replaced
36448:39c9f339b692 36449:a918c996a881
    83 
    83 
    84 from mercurial.i18n import _
    84 from mercurial.i18n import _
    85 from mercurial import (
    85 from mercurial import (
    86     cmdutil,
    86     cmdutil,
    87     commands,
    87     commands,
       
    88     encoding,
    88     error,
    89     error,
    89     formatter,
    90     formatter,
    90     hg,
    91     hg,
    91     mail,
    92     mail,
    92     node as nodemod,
    93     node as nodemod,
   667         start_time = util.parsedate(date)
   668         start_time = util.parsedate(date)
   668     else:
   669     else:
   669         start_time = util.makedate()
   670         start_time = util.makedate()
   670 
   671 
   671     def genmsgid(id):
   672     def genmsgid(id):
   672         return '<%s.%d@%s>' % (id[:20], int(start_time[0]), socket.getfqdn())
   673         return '<%s.%d@%s>' % (id[:20], int(start_time[0]),
       
   674                                encoding.strtolocal(socket.getfqdn()))
   673 
   675 
   674     # deprecated config: patchbomb.from
   676     # deprecated config: patchbomb.from
   675     sender = (opts.get('from') or ui.config('email', 'from') or
   677     sender = (opts.get('from') or ui.config('email', 'from') or
   676               ui.config('patchbomb', 'from') or
   678               ui.config('patchbomb', 'from') or
   677               prompt(ui, 'From', ui.username()))
   679               prompt(ui, 'From', ui.username()))