[PATCH 2 of 2] Add a filename for the bundle
John Goerzen
jgoerzen at complete.org
Mon Mar 26 20:52:26 CDT 2007
# HG changeset patch
# User John Goerzen <jgoerzen at complete.org>
# Date 1174960197 18000
# Node ID 9bceb8b5ac44c161b60789c9751f63e5e4886d82
# Parent 8625504f507ccdb99a2ed1a30d3cb78fca625f45
Add a filename for the bundle
diff -r 8625504f507c -r 9bceb8b5ac44 hgext/patchbomb.py
--- a/hgext/patchbomb.py Mon Mar 26 20:46:49 2007 -0500
+++ b/hgext/patchbomb.py Mon Mar 26 20:49:57 2007 -0500
@@ -332,6 +332,8 @@ def patchbomb(ui, repo, *revs, **opts):
msg.attach(email.MIMEText.MIMEText(body, 'plain'))
datapart = email.MIMEBase.MIMEBase('application', 'x-mercurial-bundle')
datapart.set_payload(bundle)
+ datapart.add_header('Content-Disposition', 'attachment',
+ filename='hgbundle.bin')
email.Encoders.encode_base64(datapart)
msg.attach(datapart)
msg['Subject'] = subj
More information about the Mercurial-devel
mailing list