diff tests/test-export.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 1a2f4c633410
children 1a9ad84583ee
line wrap: on
line diff
--- a/tests/test-export.t	Sun Feb 10 18:26:04 2013 +0100
+++ b/tests/test-export.t	Fri Feb 08 22:54:17 2013 +0100
@@ -123,6 +123,7 @@
   # HG changeset patch
   # User test
   # Date 0 0
+  #      Thu Jan 01 00:00:00 1970 +0000
   # Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd
   # Parent  747d3c68f8ec44bb35816bfcd59aeb50b9654c2f
   foo-10
@@ -169,6 +170,7 @@
   # HG changeset patch
   # User test
   # Date 0 0
+  #      Thu Jan 01 00:00:00 1970 +0000
   # Node ID * (glob)
   # Parent * (glob)
    !"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~