Mercurial > hg-stable
comparison hgext/patchbomb.py @ 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 | 258e3a7955b8 |
comparison
equal
deleted
inserted
replaced
1845:cfe689ab3f06 | 1846:4d2791f4ef80 |
---|---|
139 while patch and not patch[0].strip(): patch.pop(0) | 139 while patch and not patch[0].strip(): patch.pop(0) |
140 if opts['diffstat']: | 140 if opts['diffstat']: |
141 body += cdiffstat('\n'.join(desc), patch) + '\n\n' | 141 body += cdiffstat('\n'.join(desc), patch) + '\n\n' |
142 body += '\n'.join(patch) | 142 body += '\n'.join(patch) |
143 msg = email.MIMEText.MIMEText(body) | 143 msg = email.MIMEText.MIMEText(body) |
144 subj = '[PATCH %d of %d] %s' % (idx, total, desc[0].strip()) | 144 if total == 1: |
145 subj = '[PATCH] ' + desc[0].strip() | |
146 else: | |
147 subj = '[PATCH %d of %d] %s' % (idx, total, desc[0].strip()) | |
145 if subj.endswith('.'): subj = subj[:-1] | 148 if subj.endswith('.'): subj = subj[:-1] |
146 msg['Subject'] = subj | 149 msg['Subject'] = subj |
147 msg['X-Mercurial-Node'] = node | 150 msg['X-Mercurial-Node'] = node |
148 return msg | 151 return msg |
149 | 152 |