changeset 1846:4d2791f4ef80

only put numbers on patches if > 1 patch.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Mon, 06 Mar 2006 21:06:53 -0800
parents cfe689ab3f06
children 94498a262d15 bb70ffebe77b
files hgext/patchbomb.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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