Show More
@@ -158,7 +158,8 b' def patchbomb(ui, repo, *revs, **opts):' | |||
|
158 | 158 | if total == 1: |
|
159 | 159 | subj = '[PATCH] ' + desc[0].strip() |
|
160 | 160 | else: |
|
161 | subj = '[PATCH %d of %d] %s' % (idx, total, desc[0].strip()) | |
|
161 | tlen = len(str(total)) | |
|
162 | subj = '[PATCH %0*d of %d] %s' % (tlen, idx, total, desc[0].strip()) | |
|
162 | 163 | if subj.endswith('.'): subj = subj[:-1] |
|
163 | 164 | msg['Subject'] = subj |
|
164 | 165 | msg['X-Mercurial-Node'] = node |
@@ -217,10 +218,14 b' def patchbomb(ui, repo, *revs, **opts):' | |||
|
217 | 218 | if len(patches) > 1: |
|
218 | 219 | ui.write(_('\nWrite the introductory message for the patch series.\n\n')) |
|
219 | 220 | |
|
220 | subj = '[PATCH 0 of %d] %s' % ( | |
|
221 | tlen = len(str(len(patches))) | |
|
222 | ||
|
223 | subj = '[PATCH %0*d of %d] %s' % ( | |
|
224 | tlen, 0, | |
|
221 | 225 | len(patches), |
|
222 | 226 | opts['subject'] or |
|
223 |
prompt('Subject:', rest = ' [PATCH 0 of %d] ' % |
|
|
227 | prompt('Subject:', rest = ' [PATCH %0*d of %d] ' % (tlen, 0, | |
|
228 | len(patches)))) | |
|
224 | 229 | |
|
225 | 230 | ui.write(_('Finish with ^D or a dot on a line by itself.\n\n')) |
|
226 | 231 |
General Comments 0
You need to be logged in to leave comments.
Login now