Add a filename for the bundle
authorJohn Goerzen <jgoerzen@complete.org>
Mon, 26 Mar 2007 20:49:57 -0500
changeset 4284 a04141f51056
parent 4283 8625504f507c
child 4285 4fd6f7e60894
Add a filename for the bundle
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 @@
             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='bundle.hg')
         email.Encoders.encode_base64(datapart)
         msg.attach(datapart)
         msg['Subject'] = subj