##// END OF EJS Templates
patchbomb: extract function for generating message-id...
Augie Fackler -
r39153:4899c6d2 default
parent child Browse files
Show More
@@ -469,6 +469,10 b' def _getoutgoing(repo, dest, revs):'
469 ui.status(_("no changes found\n"))
469 ui.status(_("no changes found\n"))
470 return revs
470 return revs
471
471
472 def _msgid(node, timestamp):
473 return '<%s.%d@%s>' % (node, timestamp,
474 encoding.strtolocal(socket.getfqdn()))
475
472 emailopts = [
476 emailopts = [
473 ('', 'body', None, _('send patches as inline message text (default)')),
477 ('', 'body', None, _('send patches as inline message text (default)')),
474 ('a', 'attach', None, _('send patches as attachments')),
478 ('a', 'attach', None, _('send patches as attachments')),
@@ -677,8 +681,7 b' def email(ui, repo, *revs, **opts):'
677 start_time = dateutil.makedate()
681 start_time = dateutil.makedate()
678
682
679 def genmsgid(id):
683 def genmsgid(id):
680 return '<%s.%d@%s>' % (id[:20], int(start_time[0]),
684 return _msgid(id[:20], int(start_time[0]))
681 encoding.strtolocal(socket.getfqdn()))
682
685
683 # deprecated config: patchbomb.from
686 # deprecated config: patchbomb.from
684 sender = (opts.get('from') or ui.config('email', 'from') or
687 sender = (opts.get('from') or ui.config('email', 'from') or
General Comments 0
You need to be logged in to leave comments. Login now