comparison hgext/patchbomb.py @ 4142:ba3e13306f70

patchbomb: Strip more than one trailing dot (and spaces between them)
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 04 Mar 2007 18:42:31 +0100
parents 49d7a035235b
children 03e9c22a6489 8e37342cb05d
comparison
equal deleted inserted replaced
4141:49d7a035235b 4142:ba3e13306f70
154 msg.attach(p) 154 msg.attach(p)
155 else: 155 else:
156 body += '\n'.join(patch) 156 body += '\n'.join(patch)
157 msg = email.MIMEText.MIMEText(body) 157 msg = email.MIMEText.MIMEText(body)
158 158
159 subj = desc[0].strip() 159 subj = desc[0].strip().rstrip('. ')
160 if subj.endswith('.'): subj = subj[:-1]
161 if total == 1: 160 if total == 1:
162 subj = '[PATCH] ' + (opts['subject'] or subj) 161 subj = '[PATCH] ' + (opts['subject'] or subj)
163 else: 162 else:
164 tlen = len(str(total)) 163 tlen = len(str(total))
165 subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, subj) 164 subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, subj)