only put numbers on patches if > 1 patch.
authorVadim Gelfer <vadim.gelfer@gmail.com>
Mon, 06 Mar 2006 21:06:53 -0800
changeset 1846 4d2791f4ef80
parent 1845 cfe689ab3f06
child 1847 94498a262d15
child 1848 bb70ffebe77b
only put numbers on patches if > 1 patch.
hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -141,7 +141,10 @@ def patchbomb(ui, repo, *revs, **opts):
             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