diff tests/test-patchbomb.t @ 18648:76b69cccb07a

export: show 'Date' header in a format that also is readable for humans 'export' is the official export format and used by patchbomb, but it would only show date as a timestamp that most humans might find it hard to relate to. It would be very convenient when reviewing a patch to be able to see what timestamp the patch will end up with. Mercurial has always used util.parsedate for parsing these headers. It can handle 'all' date formats, so we could just as well use a readable one. 'export' will now use the format used by 'log' - which is the format described as 'Unix date format' in the templating help. We assume that all parsers of '# HG changeset patch'es can handle that.
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 08 Feb 2013 22:54:17 +0100
parents d38d90ad5bbf
children aa9385f983fa
line wrap: on
line diff
--- a/tests/test-patchbomb.t	Sun Feb 10 18:26:04 2013 +0100
+++ b/tests/test-patchbomb.t	Fri Feb 08 22:54:17 2013 +0100
@@ -27,6 +27,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -98,6 +99,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -126,6 +128,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -258,6 +261,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f
   # Parent  ff2c9fa2018b15fa74b33363bda9527323e2a99f
   utf-8 content
@@ -297,21 +301,23 @@
   To: foo
   Cc: bar
   
-  IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUg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FuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAK
+  QEAgLTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5
+  ZmEyMDE4YiAtciA5MDlhMDBlMTNlOWQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDow
+  MDowMCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAK
+  QEAgLTAsMCArMSwxIEBACitow7ZtbWEhCg==
   
   
   $ python -c 'print open("mbox").read().split("\n\n")[1].decode("base64")'
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f
   # Parent  ff2c9fa2018b15fa74b33363bda9527323e2a99f
   utf-8 content
@@ -357,6 +363,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   # Parent  909a00e13e9d78b575aeee23dddbada46d5a143f
   long line
@@ -407,6 +414,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   # Parent  909a00e13e9d78b575aeee23dddbada46d5a143f
   long line
@@ -465,6 +473,7 @@
   # HG changeset patch
   # User test
   # Date 5 0
+  #      Thu Jan 01 00:00:05 1970 +0000
   # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
   # Parent  a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   isolatin 8-bit encoding
@@ -513,6 +522,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -590,6 +600,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -622,6 +633,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -659,6 +671,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -698,6 +711,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   # Parent  909a00e13e9d78b575aeee23dddbada46d5a143f
   long line
@@ -771,6 +785,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -805,6 +820,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -839,6 +855,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   # Parent  909a00e13e9d78b575aeee23dddbada46d5a143f
   long line
@@ -902,6 +919,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -949,6 +967,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   # Parent  909a00e13e9d78b575aeee23dddbada46d5a143f
   long line
@@ -1002,6 +1021,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1021,6 +1041,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1087,6 +1108,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -1130,6 +1152,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -1173,6 +1196,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   # Parent  909a00e13e9d78b575aeee23dddbada46d5a143f
   long line
@@ -1241,6 +1265,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1291,6 +1316,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1342,6 +1368,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -1370,6 +1397,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -1404,6 +1432,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1438,6 +1467,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1480,6 +1510,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1536,6 +1567,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -1570,6 +1602,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -1607,6 +1640,7 @@
   # HG changeset patch
   # User test
   # Date 0 0
+  #      Thu Jan 01 00:00:00 1970 +0000
   # Node ID 7aead2484924c445ad8ce2613df91f52f9e502ed
   # Parent  045ca29b1ea20e4940411e695e20e521f2f0f98e
   Added tag two, two.diff for changeset ff2c9fa2018b
@@ -1646,6 +1680,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -1674,6 +1709,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -1728,6 +1764,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -1756,6 +1793,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -1789,6 +1827,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1840,6 +1879,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -1868,6 +1908,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -1901,6 +1942,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -1952,6 +1994,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -1980,6 +2023,7 @@
   # HG changeset patch
   # User test
   # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
   # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
   # Parent  8580ff50825a50c8f716709acdf8de0deddcd6ab
   b
@@ -2017,6 +2061,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -2056,6 +2101,7 @@
   # HG changeset patch
   # User test
   # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
   # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
   # Parent  0000000000000000000000000000000000000000
   a
@@ -2144,6 +2190,7 @@
   # HG changeset patch
   # User test
   # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
   # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
   c
@@ -2171,6 +2218,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f
   # Parent  ff2c9fa2018b15fa74b33363bda9527323e2a99f
   utf-8 content
@@ -2205,6 +2253,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   # Parent  909a00e13e9d78b575aeee23dddbada46d5a143f
   long line
@@ -2248,6 +2297,7 @@
   # HG changeset patch
   # User test
   # Date 5 0
+  #      Thu Jan 01 00:00:05 1970 +0000
   # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
   # Parent  a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
   isolatin 8-bit encoding
@@ -2275,6 +2325,7 @@
   # HG changeset patch
   # User test
   # Date 0 0
+  #      Thu Jan 01 00:00:00 1970 +0000
   # Node ID 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433
   # Parent  240fb913fc1b7ff15ddb9f33e73d82bf5277c720
   Added tag zero, zero.foo for changeset 8580ff50825a
@@ -2303,6 +2354,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Branch test
   # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9
@@ -2338,6 +2390,7 @@
   # HG changeset patch
   # User test
   # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
   # Branch test
   # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
   # Parent  97d72e5f12c7e84f85064aa72e5a297142c36ed9