equal
deleted
inserted
replaced
494 if not parent.startswith('<'): |
494 if not parent.startswith('<'): |
495 parent = '<' + parent |
495 parent = '<' + parent |
496 if not parent.endswith('>'): |
496 if not parent.endswith('>'): |
497 parent += '>' |
497 parent += '>' |
498 |
498 |
499 first = True |
|
500 |
|
501 sender_addr = email.Utils.parseaddr(sender)[1] |
499 sender_addr = email.Utils.parseaddr(sender)[1] |
502 sender = mail.addressencode(ui, sender, _charsets, opts.get('test')) |
500 sender = mail.addressencode(ui, sender, _charsets, opts.get('test')) |
503 sendmail = None |
501 sendmail = None |
504 for i, (m, subj, ds) in enumerate(msgs): |
502 for i, (m, subj, ds) in enumerate(msgs): |
505 try: |
503 try: |
507 except TypeError: |
505 except TypeError: |
508 m['Message-Id'] = genmsgid('patchbomb') |
506 m['Message-Id'] = genmsgid('patchbomb') |
509 if parent: |
507 if parent: |
510 m['In-Reply-To'] = parent |
508 m['In-Reply-To'] = parent |
511 m['References'] = parent |
509 m['References'] = parent |
512 if first: |
510 if not parent or 'X-Mercurial-Node' not in m: |
513 parent = m['Message-Id'] |
511 parent = m['Message-Id'] |
514 first = False |
|
515 |
512 |
516 m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version() |
513 m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version() |
517 m['Date'] = email.Utils.formatdate(start_time[0], localtime=True) |
514 m['Date'] = email.Utils.formatdate(start_time[0], localtime=True) |
518 |
515 |
519 start_time = (start_time[0] + 1, start_time[1]) |
516 start_time = (start_time[0] + 1, start_time[1]) |