Mercurial > public > mercurial-scm > hg-stable
diff hgext/patchbomb.py @ 8514:252232621165
patchbomb: with --in-reply-to, still thread message under first in series
When specifying --in-reply-to for a message M, have
[M]
[0/2]
[1/2]
[2/2]
instead of
[M]
[0/2]
[1/2]
[2/2]
which is more consistent with the way messages are being threaded
when --in-reply-to is not used.
author | C?dric Duval <cedricduval@free.fr> |
---|---|
date | Tue, 19 May 2009 01:37:38 +0200 |
parents | b87e5ad94229 |
children | 8c7f1afad064 |
line wrap: on
line diff
--- a/hgext/patchbomb.py Tue May 19 01:17:54 2009 +0200 +++ b/hgext/patchbomb.py Tue May 19 01:37:38 2009 +0200 @@ -397,6 +397,7 @@ ui.write('\n') parent = opts.get('in_reply_to') or None + first = True sender_addr = email.Utils.parseaddr(sender)[1] sender = mail.addressencode(ui, sender, _charsets, opts.get('test')) @@ -409,8 +410,10 @@ if parent: m['In-Reply-To'] = parent m['References'] = parent - else: + if first: parent = m['Message-Id'] + first = False + m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version() m['Date'] = util.datestr(start_time, "%a, %d %b %Y %H:%M:%S %1%2")