patchbomb: fix generation of message-id when sending attachments
node was set to bin(node) before message-id was created
--- a/hgext/patchbomb.py Fri Jul 28 10:47:02 2006 -0700
+++ b/hgext/patchbomb.py Fri Jul 28 22:17:32 2006 +0200
@@ -135,17 +135,17 @@
msg = email.MIMEMultipart.MIMEMultipart()
if body: msg.attach(email.MIMEText.MIMEText(body, 'plain'))
p = email.MIMEText.MIMEText('\n'.join(patch), 'x-patch')
- node = bin(node)
+ binnode = bin(node)
# if node is mq patch, it will have patch file name as tag
- patchname = [t for t in repo.nodetags(node)
+ patchname = [t for t in repo.nodetags(binnode)
if t.endswith('.patch') or t.endswith('.diff')]
if patchname:
patchname = patchname[0]
elif total > 1:
patchname = commands.make_filename(repo, '%b-%n.patch',
- node, idx, total)
+ binnode, idx, total)
else:
- patchname = commands.make_filename(repo, '%b.patch', node)
+ patchname = commands.make_filename(repo, '%b.patch', binnode)
p['Content-Disposition'] = 'inline; filename=' + patchname
msg.attach(p)
else: