<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 02/09/2013 10:34 AM, Idan Kamara
wrote:<br>
</div>
<blockquote
cite="mid:CAMz0A7mendn10GpkQetXP6Ujz6Zh=9Won3rs-qw9OzDY_rxPCA@mail.gmail.com"
type="cite">
<div dir="ltr">On Sat, Feb 9, 2013 at 11:31 AM, Mads Kiilerich
<<a moz-do-not-send="true" href="mailto:mads@kiilerich.com">mads@kiilerich.com</a>>
wrote:<br>
><br>
> # HG changeset patch<br>
> # User Mads Kiilerich <<a moz-do-not-send="true"
href="mailto:mads@kiilerich.com">mads@kiilerich.com</a>><br>
> # Date 1360360457 -3600<br>
> # Node ID 055060daf58dbe46c667053cbb04409b202ee9cd<br>
> # Parent 97761496c65ae836d6b0983a3f48959dd3112364<br>
> export: show 'Date' header in a format that also is
readable for humans<br>
><br>
> 'export' is the official export format and used by
patchbomb, but it would<br>
> only<br>
> show date as a timestamp that most humans might find it
hard to relate to.<br>
> It<br>
> would be very convenient when reviewing a patch to be able
to see what<br>
> timestamp the patch will end up with.<br>
><br>
> Mercurial has always used util.parsedate for parsing these
headers. It can<br>
> handle 'all' date formats, so we could just as well use a
readable one.<br>
><br>
> 'export' will now use the format used by 'log' - which is
the format<br>
> described<br>
> as 'Unix date format' in the templating help. We assume
that all parsers<br>
> of '#<br>
> HG changeset patch'es can handle that.<br>
><br>
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py<br>
> --- a/mercurial/cmdutil.py<br>
> +++ b/mercurial/cmdutil.py<br>
> @@ -569,7 +569,7 @@<br>
><br>
> write("# HG changeset patch\n")<br>
> write("# User %s\n" % ctx.user())<br>
> - write("# Date %d %d\n" % ctx.date())<br>
> + write("# Date %s\n" % util.datestr(ctx.date()))<br>
> if branch and branch != 'default':<br>
> write("# Branch %s\n" % branch)<br>
> write("# Node ID %s\n" % hex(node))<br>
> diff --git a/tests/test-alias.t b/tests/test-alias.t<br>
> --- a/tests/test-alias.t<br>
> +++ b/tests/test-alias.t<br>
> @@ -180,7 +180,7 @@<br>
> $ cat 0.diff<br>
> # HG changeset patch<br>
> # User test<br>
> - # Date 0 0<br>
> + # Date Thu Jan 01 00:00:00 1970 +0000<br>
> # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0<br>
> # Parent 0000000000000000000000000000000000000000<br>
> foo<br>
> @@ -224,7 +224,7 @@<br>
> 2<br>
><br>
> $ hg tglog<br>
> - @ 1:7e7f92de180e: 'bar'<br>
> + @ 1:c199fc2b9f8e: 'bar'<br>
> |<br>
> o 0:e63c23eaa88a: 'foo'<br>
><br>
> @@ -237,15 +237,15 @@<br>
> idalias idaliaslong idaliasshell identify import
incoming init<br>
> [255]<br>
> $ hg id<br>
> - 7e7f92de180e tip<br>
> + c199fc2b9f8e tip<br>
> $ hg ida<br>
> hg: command 'ida' is ambiguous:<br>
> idalias idaliaslong idaliasshell<br>
> [255]<br>
> $ hg idalias<br>
> - 7e7f92de180e tip<br>
> + c199fc2b9f8e tip<br>
> $ hg idaliasl<br>
> - 7e7f92de180e tip<br>
> + c199fc2b9f8e tip
<div><br>
</div>
<div>How come the hashes changed here?<br>
</div>
</div>
</blockquote>
<br>
That is because the test use<br>
> put = export -r 0 -o "\$FOO/%R.diff"<br>
and commit this file.<br>
<br>
Any change to the export format will thus also change the hash.<br>
<br>
/Mads<br>
<br>
</body>
</html>