changeset 9047:8263d98ffb1c

patchbomb: use local time for the Date: header
author Cédric Duval <cedricduval@free.fr>
date Sun, 05 Jul 2009 17:09:01 +0200
parents 1547126630e9
children 86b4a9b0ddda
files hgext/patchbomb.py tests/test-patchbomb.out
diffstat 2 files changed, 40 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Sun Jul 05 16:42:10 2009 +0200
+++ b/hgext/patchbomb.py	Sun Jul 05 17:09:01 2009 +0200
@@ -417,7 +417,7 @@
             first = False
 
         m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version()
-        m['Date'] = email.Utils.formatdate(start_time[0])
+        m['Date'] = email.Utils.formatdate(start_time[0], localtime=True)
 
         start_time = (start_time[0] + 1, start_time[1])
         m['From'] = sender
--- a/tests/test-patchbomb.out	Sun Jul 05 16:42:10 2009 +0200
+++ b/tests/test-patchbomb.out	Sun Jul 05 17:09:01 2009 +0200
@@ -10,7 +10,7 @@
 X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
 Message-Id: <8580ff50825a50c8f716.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -42,7 +42,7 @@
 Subject: [PATCH 0 of 2] test
 Message-Id: <patchbomb.120@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:02:00 -0000
+Date: Thu, 01 Jan 1970 00:02:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -58,7 +58,7 @@
 In-Reply-To: <patchbomb.120@
 References: <patchbomb.120@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:02:01 -0000
+Date: Thu, 01 Jan 1970 00:02:01 +0000
 From: quux
 To: foo
 Cc: bar
@@ -86,7 +86,7 @@
 In-Reply-To: <patchbomb.120@
 References: <patchbomb.120@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:02:02 -0000
+Date: Thu, 01 Jan 1970 00:02:02 +0000
 From: quux
 To: foo
 Cc: bar
@@ -124,7 +124,7 @@
 Subject: test
 Message-Id: <patchbomb.180@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:03:00 -0000
+Date: Thu, 01 Jan 1970 00:03:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -157,7 +157,7 @@
 adding utf
 % no mime encoding for email --test
 % md5sum of 8-bit output
-1b28ee86c937a1f9e2bf6fc5eabd00a5  mailtest
+e726c29b3008e77994c7572563e57c34  mailtest
 % mime encoded mbox (base64)
 This patch series consists of 1 patches.
 
@@ -171,7 +171,7 @@
 X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
 Message-Id: <c3c9e37db9f4fe4882cd.240@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:04:00 -0000
+Date: Thu, 01 Jan 1970 00:04:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -192,7 +192,7 @@
 adding qp
 % no mime encoding for email --test
 % md5sum of qp output
-7b5f11d50349b32eff4a9b2daaa82e7f  mailtest
+0402c7d033e04044e423bb04816f9dae  mailtest
 % mime encoded mbox (quoted-printable)
 This patch series consists of 1 patches.
 
@@ -206,7 +206,7 @@
 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
 Message-Id: <c655633f8c87700bb38c.240@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:04:00 -0000
+Date: Thu, 01 Jan 1970 00:04:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -249,7 +249,7 @@
 
 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
 % md5sum of 8-bit output
-8ce4c019c17ca51a293c055382d76d67  mboxfix
+0920ef519c29b6a1742047ad9f203fc5  mboxfix
 % test diffstat for single patch
 This patch series consists of 1 patches.
 
@@ -267,7 +267,7 @@
 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
 Message-Id: <ff2c9fa2018b15fa74b3.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -319,7 +319,7 @@
 Subject: [PATCH 0 of 2] test
 Message-Id: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -339,7 +339,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:01 -0000
+Date: Thu, 01 Jan 1970 00:01:01 +0000
 From: quux
 To: foo
 Cc: bar
@@ -371,7 +371,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:02 -0000
+Date: Thu, 01 Jan 1970 00:01:02 +0000
 From: quux
 To: foo
 Cc: bar
@@ -404,7 +404,7 @@
 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
 Message-Id: <ff2c9fa2018b15fa74b3.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -440,7 +440,7 @@
 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
 Message-Id: <c655633f8c87700bb38c.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -495,7 +495,7 @@
 Subject: [PATCH 0 of 3] test
 Message-Id: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -510,7 +510,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:01 -0000
+Date: Thu, 01 Jan 1970 00:01:01 +0000
 From: quux
 To: foo
 Cc: bar
@@ -544,7 +544,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:02 -0000
+Date: Thu, 01 Jan 1970 00:01:02 +0000
 From: quux
 To: foo
 Cc: bar
@@ -579,7 +579,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:03 -0000
+Date: Thu, 01 Jan 1970 00:01:03 +0000
 From: quux
 To: foo
 Cc: bar
@@ -631,7 +631,7 @@
 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
 Message-Id: <ff2c9fa2018b15fa74b3.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -676,7 +676,7 @@
 X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
 Message-Id: <c655633f8c87700bb38c.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -740,7 +740,7 @@
 Subject: [PATCH 0 of 3] test
 Message-Id: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -755,7 +755,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:01 -0000
+Date: Thu, 01 Jan 1970 00:01:01 +0000
 From: quux
 To: foo
 Cc: bar
@@ -798,7 +798,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:02 -0000
+Date: Thu, 01 Jan 1970 00:01:02 +0000
 From: quux
 To: foo
 Cc: bar
@@ -842,7 +842,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:03 -0000
+Date: Thu, 01 Jan 1970 00:01:03 +0000
 From: quux
 To: foo
 Cc: bar
@@ -906,7 +906,7 @@
 Subject: [PATCH 0 of 1] test
 Message-Id: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -922,7 +922,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:01 -0000
+Date: Thu, 01 Jan 1970 00:01:01 +0000
 From: quux
 To: foo
 Cc: bar
@@ -954,7 +954,7 @@
 Subject: [PATCH 0 of 2] test
 Message-Id: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -970,7 +970,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:01 -0000
+Date: Thu, 01 Jan 1970 00:01:01 +0000
 From: quux
 To: foo
 Cc: bar
@@ -998,7 +998,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:02 -0000
+Date: Thu, 01 Jan 1970 00:01:02 +0000
 From: quux
 To: foo
 Cc: bar
@@ -1028,7 +1028,7 @@
 X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
 Message-Id: <ff2c9fa2018b15fa74b3.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -1067,7 +1067,7 @@
 Subject: [PATCH 0 of 2] test
 Message-Id: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -1082,7 +1082,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:01 -0000
+Date: Thu, 01 Jan 1970 00:01:01 +0000
 From: quux
 To: foo
 Cc: bar
@@ -1116,7 +1116,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:02 -0000
+Date: Thu, 01 Jan 1970 00:01:02 +0000
 From: quux
 To: foo
 Cc: bar
@@ -1155,7 +1155,7 @@
 In-Reply-To: <baz>
 References: <baz>
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -1192,7 +1192,7 @@
 In-Reply-To: <baz>
 References: <baz>
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:00 -0000
+Date: Thu, 01 Jan 1970 00:01:00 +0000
 From: quux
 To: foo
 Cc: bar
@@ -1208,7 +1208,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:01 -0000
+Date: Thu, 01 Jan 1970 00:01:01 +0000
 From: quux
 To: foo
 Cc: bar
@@ -1236,7 +1236,7 @@
 In-Reply-To: <patchbomb.60@
 References: <patchbomb.60@
 User-Agent: Mercurial-patchbomb
-Date: Thu, 01 Jan 1970 00:01:02 -0000
+Date: Thu, 01 Jan 1970 00:01:02 +0000
 From: quux
 To: foo
 Cc: bar