# HG changeset patch # User Vadim Gelfer # Date 1141708013 28800 # Node ID 4d2791f4ef803c5a1a72ecd23392155a76be3292 # Parent cfe689ab3f063758da0cfcf641a6c35590996002 only put numbers on patches if > 1 patch. diff -r cfe689ab3f06 -r 4d2791f4ef80 hgext/patchbomb.py --- a/hgext/patchbomb.py Mon Mar 06 21:05:18 2006 -0800 +++ b/hgext/patchbomb.py Mon Mar 06 21:06:53 2006 -0800 @@ -141,7 +141,10 @@ body += cdiffstat('\n'.join(desc), patch) + '\n\n' body += '\n'.join(patch) msg = email.MIMEText.MIMEText(body) - subj = '[PATCH %d of %d] %s' % (idx, total, desc[0].strip()) + if total == 1: + subj = '[PATCH] ' + desc[0].strip() + else: + subj = '[PATCH %d of %d] %s' % (idx, total, desc[0].strip()) if subj.endswith('.'): subj = subj[:-1] msg['Subject'] = subj msg['X-Mercurial-Node'] = node