[PATCH] export: introduce 'Unix Date' header with the date spelled out

Matt Mackall mpm at selenic.com
Sat Feb 9 05:09:39 CST 2013


On Fri, 2013-02-08 at 17:23 -0500, Greg Ward wrote:
> On 08 February 2013, Mads Kiilerich said:
> > # HG changeset patch
> > # User Mads Kiilerich <mads at kiilerich.com>
> > # Date 1360346908 -3600
> > # Node ID 990ae56ef86ea6b2357f022acc8e8e7c72f9ecc8
> > # Parent  5ad1b38d9eb9f7f7ecdb9a0281178070837c47d7
> > export: introduce 'Unix Date' header with the date spelled out
> > 
> > 'export' is the official export format and used by patchbomb, but it will only
> > include date as a timestamp that most humans might find it hard to relate to.
> > It is very convenient when reviewing a patch to be able to see what timestamp
> > the patch will end up with.
> > 
> > This patch will introduce a new 'Unix Date' header. Tools parsing headers
> > should just ignore this 'unknown' line.
> 
> Like the feature. Not so keen on the name. Random thoughts...
> 
>     English date
>     Human date
>     Readable date
>     Text date
>     RFC822 date

As it happens, we've parsed the date field in patches with parsedate()
for a very long time. So I think we might just stick a human-readable
date in the existing field without any problem.

> Also, that date format is ... weird, because the time comes between
> the day and the year. I would prefer either something like ISO format
> 
>   1970-01-01 00:00:00 +0000

The ISO format is fine, but we've got a fair amount of precedent in our
hg log output.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list