##// END OF EJS Templates
patchbomb: normalize date format in generated mboxes...
Patrick Mezard -
r9818:72d670c4 default
parent child Browse files
Show More
@@ -451,7 +451,10 b' def patchbomb(ui, repo, *revs, **opts):'
451 ui.status(_('Writing '), subj, ' ...\n')
451 ui.status(_('Writing '), subj, ' ...\n')
452 fp = open(opts.get('mbox'), 'In-Reply-To' in m and 'ab+' or 'wb+')
452 fp = open(opts.get('mbox'), 'In-Reply-To' in m and 'ab+' or 'wb+')
453 generator = email.Generator.Generator(fp, mangle_from_=True)
453 generator = email.Generator.Generator(fp, mangle_from_=True)
454 date = time.ctime(start_time[0])
454 # Should be time.asctime(), but Windows prints 2-characters day
455 # of month instead of one. Make them print the same thing.
456 date = time.strftime('%a %b %d %H:%M:%S %Y',
457 time.localtime(start_time[0]))
455 fp.write('From %s %s\n' % (sender_addr, date))
458 fp.write('From %s %s\n' % (sender_addr, date))
456 generator.flatten(m, 0)
459 generator.flatten(m, 0)
457 fp.write('\n\n')
460 fp.write('\n\n')
@@ -163,7 +163,7 b' This patch series consists of 1 patches.'
163
163
164
164
165 Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
165 Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
166 From quux Thu Jan 1 00:04:01 1970
166 From quux Thu Jan 01 00:04:01 1970
167 Content-Type: text/plain; charset="utf-8"
167 Content-Type: text/plain; charset="utf-8"
168 MIME-Version: 1.0
168 MIME-Version: 1.0
169 Content-Transfer-Encoding: base64
169 Content-Transfer-Encoding: base64
@@ -198,7 +198,7 b' This patch series consists of 1 patches.'
198
198
199
199
200 Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
200 Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
201 From quux Thu Jan 1 00:04:01 1970
201 From quux Thu Jan 01 00:04:01 1970
202 Content-Type: text/plain; charset="us-ascii"
202 Content-Type: text/plain; charset="us-ascii"
203 MIME-Version: 1.0
203 MIME-Version: 1.0
204 Content-Transfer-Encoding: quoted-printable
204 Content-Transfer-Encoding: quoted-printable
@@ -249,7 +249,7 b' This patch series consists of 1 patches.'
249
249
250 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
250 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
251 % md5sum of 8-bit output
251 % md5sum of 8-bit output
252 0920ef519c29b6a1742047ad9f203fc5 mboxfix
252 9ea043d8fc43a71045114508baed144b mboxfix
253 % test diffstat for single patch
253 % test diffstat for single patch
254 This patch series consists of 1 patches.
254 This patch series consists of 1 patches.
255
255
@@ -1474,7 +1474,7 b' This patch series consists of 1 patches.'
1474
1474
1475
1475
1476 Writing [PATCH] test ...
1476 Writing [PATCH] test ...
1477 From quux Tue Jan 1 00:01:01 1980
1477 From quux Tue Jan 01 00:01:01 1980
1478 Content-Type: text/plain; charset="us-ascii"
1478 Content-Type: text/plain; charset="us-ascii"
1479 MIME-Version: 1.0
1479 MIME-Version: 1.0
1480 Content-Transfer-Encoding: 7bit
1480 Content-Transfer-Encoding: 7bit
General Comments 0
You need to be logged in to leave comments. Login now