Show More
@@ -155,12 +155,14 b' def patchbomb(ui, repo, *revs, **opts):' | |||
|
155 | 155 | else: |
|
156 | 156 | body += '\n'.join(patch) |
|
157 | 157 | msg = email.MIMEText.MIMEText(body) |
|
158 | ||
|
159 | subj = desc[0].strip() | |
|
160 | if subj.endswith('.'): subj = subj[:-1] | |
|
158 | 161 | if total == 1: |
|
159 |
subj = '[PATCH] ' + |
|
|
162 | subj = '[PATCH] ' + (opts['subject'] or subj) | |
|
160 | 163 | else: |
|
161 | 164 | tlen = len(str(total)) |
|
162 |
subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, |
|
|
163 | if subj.endswith('.'): subj = subj[:-1] | |
|
165 | subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, subj) | |
|
164 | 166 | msg['Subject'] = subj |
|
165 | 167 | msg['X-Mercurial-Node'] = node |
|
166 | 168 | return msg |
@@ -309,7 +311,7 b' cmdtable = {' | |||
|
309 | 311 | ('', 'plain', None, 'omit hg patch header'), |
|
310 | 312 | ('n', 'test', None, 'print messages that would be sent'), |
|
311 | 313 | ('m', 'mbox', '', 'write messages to mbox file instead of sending them'), |
|
312 |
('s', 'subject', '', 'subject of |
|
|
314 | ('s', 'subject', '', 'subject of first message (intro or single patch)'), | |
|
313 | 315 | ('t', 'to', [], 'email addresses of recipients')], |
|
314 | 316 | "hg email [OPTION]... [REV]...") |
|
315 | 317 | } |
General Comments 0
You need to be logged in to leave comments.
Login now