##// END OF EJS Templates
patchbomb: optionally send patches as inline attachments
Christian Ebert -
r2707:4af7b178 default
parent child Browse files
Show More
@@ -130,8 +130,13 b' def patchbomb(ui, repo, *revs, **opts):'
130 130 while patch and not patch[0].strip(): patch.pop(0)
131 131 if opts['diffstat']:
132 132 body += cdiffstat('\n'.join(desc), patch) + '\n\n'
133 body += '\n'.join(patch)
134 msg = email.MIMEText.MIMEText(body)
133 if opts['attach']:
134 msg = email.MIMEMultipart.MIMEMultipart()
135 if body: msg.attach(email.MIMEText.MIMEText(body, 'plain'))
136 msg.attach(email.MIMEText.MIMEText('\n'.join(patch), 'x-patch'))
137 else:
138 body += '\n'.join(patch)
139 msg = email.MIMEText.MIMEText(body)
135 140 if total == 1:
136 141 subj = '[PATCH] ' + desc[0].strip()
137 142 else:
@@ -274,7 +279,8 b' def patchbomb(ui, repo, *revs, **opts):'
274 279 cmdtable = {
275 280 'email':
276 281 (patchbomb,
277 [('', 'bcc', [], 'email addresses of blind copy recipients'),
282 [('a', 'attach', None, 'send patches as inline attachments'),
283 ('', 'bcc', [], 'email addresses of blind copy recipients'),
278 284 ('c', 'cc', [], 'email addresses of copy recipients'),
279 285 ('d', 'diffstat', None, 'add diffstat output to messages'),
280 286 ('f', 'from', '', 'email address of sender'),
General Comments 0
You need to be logged in to leave comments. Login now