--- a/hgext/patchbomb.py Wed Nov 12 19:12:32 2008 +0100
+++ b/hgext/patchbomb.py Thu Nov 13 10:11:32 2008 +0100
@@ -172,7 +172,7 @@
msg = mail.mimetextpatch(body, display=opts.get('test'))
subj = desc[0].strip().rstrip('. ')
- if total == 1:
+ if total == 1 and not opts.get('intro'):
subj = '[PATCH] ' + (opts.get('subject') or subj)
else:
tlen = len(str(total))
@@ -316,7 +316,7 @@
len(patches), name)
msgs.append(msg)
- if len(patches) > 1:
+ if len(patches) > 1 or opts.get('intro'):
tlen = len(str(len(patches)))
subj = '[PATCH %0*d of %d] %s' % (
@@ -481,6 +481,8 @@
_('run even when remote repository is unrelated (with -b)')),
('', 'base', [],
_('a base changeset to specify instead of a destination (with -b)')),
+ ('', 'intro', None,
+ _('send an introduction email for a single patch')),
] + emailopts + commands.remoteopts,
_('hg email [OPTION]... [DEST]...'))
}