comparison hgext/patchbomb.py @ 39034:751caa6a2936

patchbomb: use sysstrs when describing content-type Differential Revision: https://phab.mercurial-scm.org/D4228
author Augie Fackler <augie@google.com>
date Thu, 09 Aug 2018 19:37:57 -0400
parents ed9537bd2d1a
children cecb05c371f7
comparison
equal deleted inserted replaced
39033:ed9537bd2d1a 39034:751caa6a2936
373 373
374 body = _getdescription(repo, '', sender, **opts) 374 body = _getdescription(repo, '', sender, **opts)
375 msg = emimemultipart.MIMEMultipart() 375 msg = emimemultipart.MIMEMultipart()
376 if body: 376 if body:
377 msg.attach(mail.mimeencode(ui, body, _charsets, opts.get(r'test'))) 377 msg.attach(mail.mimeencode(ui, body, _charsets, opts.get(r'test')))
378 datapart = emimebase.MIMEBase('application', 'x-mercurial-bundle') 378 datapart = emimebase.MIMEBase(r'application', r'x-mercurial-bundle')
379 datapart.set_payload(bundle) 379 datapart.set_payload(bundle)
380 bundlename = '%s.hg' % opts.get(r'bundlename', 'bundle') 380 bundlename = '%s.hg' % opts.get(r'bundlename', 'bundle')
381 datapart.add_header(r'Content-Disposition', r'attachment', 381 datapart.add_header(r'Content-Disposition', r'attachment',
382 filename=encoding.strfromlocal(bundlename)) 382 filename=encoding.strfromlocal(bundlename))
383 emailencoders.encode_base64(datapart) 383 emailencoders.encode_base64(datapart)