Mercurial > public > mercurial-scm > hg-stable
diff hgext/patchbomb.py @ 4144:03e9c22a6489
merge with crew-stable
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 05 Mar 2007 19:54:21 +0100 |
parents | 9210fba03d16 ba3e13306f70 |
children | f51317e24114 |
line wrap: on
line diff
--- a/hgext/patchbomb.py Sun Mar 04 14:35:11 2007 -0300 +++ b/hgext/patchbomb.py Mon Mar 05 19:54:21 2007 +0100 @@ -154,12 +154,13 @@ else: body += '\n'.join(patch) msg = email.MIMEText.MIMEText(body) + + subj = desc[0].strip().rstrip('. ') if total == 1: - subj = '[PATCH] ' + desc[0].strip() + subj = '[PATCH] ' + (opts['subject'] or subj) else: tlen = len(str(total)) - subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, desc[0].strip()) - if subj.endswith('.'): subj = subj[:-1] + subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, subj) msg['Subject'] = subj msg['X-Mercurial-Node'] = node return msg @@ -298,7 +299,7 @@ ('', 'plain', None, 'omit hg patch header'), ('n', 'test', None, 'print messages that would be sent'), ('m', 'mbox', '', 'write messages to mbox file instead of sending them'), - ('s', 'subject', '', 'subject of introductory message'), + ('s', 'subject', '', 'subject of first message (intro or single patch)'), ('t', 'to', [], 'email addresses of recipients')], "hg email [OPTION]... [REV]...") }