Submitter | Mads Kiilerich |
---|---|
Date | Feb. 9, 2013, 9:31 a.m. |
Message ID | <055060daf58dbe46c667.1360402284@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/854/ |
State | Accepted |
Commit | 76b69cccb07a5675bbc37caaef3b5094fea07855 |
Headers | show |
Comments
On Sat, Feb 9, 2013 at 11:31 AM, Mads Kiilerich <mads@kiilerich.com> wrote: > > # HG changeset patch > # User Mads Kiilerich <mads@kiilerich.com> > # Date 1360360457 -3600 > # Node ID 055060daf58dbe46c667053cbb04409b202ee9cd > # Parent 97761496c65ae836d6b0983a3f48959dd3112364 > 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. > > diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py > --- a/mercurial/cmdutil.py > +++ b/mercurial/cmdutil.py > @@ -569,7 +569,7 @@ > > write("# HG changeset patch\n") > write("# User %s\n" % ctx.user()) > - write("# Date %d %d\n" % ctx.date()) > + write("# Date %s\n" % util.datestr(ctx.date())) > if branch and branch != 'default': > write("# Branch %s\n" % branch) > write("# Node ID %s\n" % hex(node)) > diff --git a/tests/test-alias.t b/tests/test-alias.t > --- a/tests/test-alias.t > +++ b/tests/test-alias.t > @@ -180,7 +180,7 @@ > $ cat 0.diff > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0 > # Parent 0000000000000000000000000000000000000000 > foo > @@ -224,7 +224,7 @@ > 2 > > $ hg tglog > - @ 1:7e7f92de180e: 'bar' > + @ 1:c199fc2b9f8e: 'bar' > | > o 0:e63c23eaa88a: 'foo' > > @@ -237,15 +237,15 @@ > idalias idaliaslong idaliasshell identify import incoming init > [255] > $ hg id > - 7e7f92de180e tip > + c199fc2b9f8e tip > $ hg ida > hg: command 'ida' is ambiguous: > idalias idaliaslong idaliasshell > [255] > $ hg idalias > - 7e7f92de180e tip > + c199fc2b9f8e tip > $ hg idaliasl > - 7e7f92de180e tip > + c199fc2b9f8e tip How come the hashes changed here?
On 02/09/2013 10:34 AM, Idan Kamara wrote: > On Sat, Feb 9, 2013 at 11:31 AM, Mads Kiilerich <mads@kiilerich.com > <mailto:mads@kiilerich.com>> wrote: > > > > # HG changeset patch > > # User Mads Kiilerich <mads@kiilerich.com <mailto:mads@kiilerich.com>> > > # Date 1360360457 -3600 > > # Node ID 055060daf58dbe46c667053cbb04409b202ee9cd > > # Parent 97761496c65ae836d6b0983a3f48959dd3112364 > > 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. > > > > diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py > > --- a/mercurial/cmdutil.py > > +++ b/mercurial/cmdutil.py > > @@ -569,7 +569,7 @@ > > > > write("# HG changeset patch\n") > > write("# User %s\n" % ctx.user()) > > - write("# Date %d %d\n" % ctx.date()) > > + write("# Date %s\n" % util.datestr(ctx.date())) > > if branch and branch != 'default': > > write("# Branch %s\n" % branch) > > write("# Node ID %s\n" % hex(node)) > > diff --git a/tests/test-alias.t b/tests/test-alias.t > > --- a/tests/test-alias.t > > +++ b/tests/test-alias.t > > @@ -180,7 +180,7 @@ > > $ cat 0.diff > > # HG changeset patch > > # User test > > - # Date 0 0 > > + # Date Thu Jan 01 00:00:00 1970 +0000 > > # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0 > > # Parent 0000000000000000000000000000000000000000 > > foo > > @@ -224,7 +224,7 @@ > > 2 > > > > $ hg tglog > > - @ 1:7e7f92de180e: 'bar' > > + @ 1:c199fc2b9f8e: 'bar' > > | > > o 0:e63c23eaa88a: 'foo' > > > > @@ -237,15 +237,15 @@ > > idalias idaliaslong idaliasshell identify import incoming init > > [255] > > $ hg id > > - 7e7f92de180e tip > > + c199fc2b9f8e tip > > $ hg ida > > hg: command 'ida' is ambiguous: > > idalias idaliaslong idaliasshell > > [255] > > $ hg idalias > > - 7e7f92de180e tip > > + c199fc2b9f8e tip > > $ hg idaliasl > > - 7e7f92de180e tip > > + c199fc2b9f8e tip > > How come the hashes changed here? That is because the test use > put = export -r 0 -o "\$FOO/%R.diff" and commit this file. Any change to the export format will thus also change the hash. /Mads
On Sat, Feb 9, 2013 at 1:31 AM, Mads Kiilerich <mads@kiilerich.com> wrote: > export: show 'Date' header in a format that also is readable for humans > Looks good to me.
On Sat, Feb 9, 2013 at 9:31 AM, Mads Kiilerich <mads@kiilerich.com> wrote: > # HG changeset patch > # User Mads Kiilerich <mads@kiilerich.com> > # Date 1360360457 -3600 > # Node ID 055060daf58dbe46c667053cbb04409b202ee9cd > # Parent 97761496c65ae836d6b0983a3f48959dd3112364 > 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. Are there any third party utilities that parse these headers? I wonder if this might cause other tools to break. > '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. > > diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py > --- a/mercurial/cmdutil.py > +++ b/mercurial/cmdutil.py > @@ -569,7 +569,7 @@ > > write("# HG changeset patch\n") > write("# User %s\n" % ctx.user()) > - write("# Date %d %d\n" % ctx.date()) > + write("# Date %s\n" % util.datestr(ctx.date())) > if branch and branch != 'default': > write("# Branch %s\n" % branch) > write("# Node ID %s\n" % hex(node)) > diff --git a/tests/test-alias.t b/tests/test-alias.t > --- a/tests/test-alias.t > +++ b/tests/test-alias.t > @@ -180,7 +180,7 @@ > $ cat 0.diff > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0 > # Parent 0000000000000000000000000000000000000000 > foo > @@ -224,7 +224,7 @@ > 2 > > $ hg tglog > - @ 1:7e7f92de180e: 'bar' > + @ 1:c199fc2b9f8e: 'bar' > | > o 0:e63c23eaa88a: 'foo' > > @@ -237,15 +237,15 @@ > idalias idaliaslong idaliasshell identify import incoming init > [255] > $ hg id > - 7e7f92de180e tip > + c199fc2b9f8e tip > $ hg ida > hg: command 'ida' is ambiguous: > idalias idaliaslong idaliasshell > [255] > $ hg idalias > - 7e7f92de180e tip > + c199fc2b9f8e tip > $ hg idaliasl > - 7e7f92de180e tip > + c199fc2b9f8e tip > $ hg idaliass > test > $ hg parentsshell > diff --git a/tests/test-export.t b/tests/test-export.t > --- a/tests/test-export.t > +++ b/tests/test-export.t > @@ -107,7 +107,7 @@ > $ hg export -- -2 > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd > # Parent 747d3c68f8ec44bb35816bfcd59aeb50b9654c2f > foo-10 > @@ -153,7 +153,7 @@ > $ hg export --color always --nodates tip > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID * (glob) > # Parent * (glob) > !"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ > diff --git a/tests/test-graft.t b/tests/test-graft.t > --- a/tests/test-graft.t > +++ b/tests/test-graft.t > @@ -83,7 +83,7 @@ > $ hg export tip --git > # HG changeset patch > # User foo > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 > # Parent 68795b066622ca79a25816a662041d8f78f3cd9e > 2 > @@ -323,7 +323,7 @@ > $ hg export tip --git > # HG changeset patch > # User bar > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID 64ecd9071ce83c6e62f538d8ce7709d53f32ebf7 > # Parent 4bdb9a9d0b84ffee1d30f0dfc7744cade17aa19c > 1 > @@ -350,7 +350,7 @@ > $ hg export tip --git > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID 2e80e1351d6ed50302fe1e05f8bd1d4d412b6e11 > # Parent e5a51ae854a8bbaaf25cc5c6a57ff46042dadbb4 > 2 > diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t > --- a/tests/test-histedit-fold.t > +++ b/tests/test-histedit-fold.t > @@ -294,7 +294,7 @@ > $ hg export tip > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID 10c647b2cdd54db0603ecb99b2ff5ce66d5a5323 > # Parent 0189ba417d34df9dda55f88b637dcae9917b5964 > +4 > diff --git a/tests/test-import.t b/tests/test-import.t > --- a/tests/test-import.t > +++ b/tests/test-import.t > @@ -34,7 +34,7 @@ > $ hg --cwd b import ../exported-tip.patch > applying ../exported-tip.patch > > -message and committer should be same > +message and committer and date should be same > > $ hg --cwd b tip > changeset: 1:1d4bd90af0e4 > @@ -852,7 +852,7 @@ > $ hg export --git tip > # HG changeset patch > # User User B > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID eb56ab91903632294ac504838508cb370c0901d2 > # Parent 0000000000000000000000000000000000000000 > from: tricky! > diff --git a/tests/test-issue1175.t b/tests/test-issue1175.t > --- a/tests/test-issue1175.t > +++ b/tests/test-issue1175.t > @@ -43,7 +43,7 @@ > $ hg export --git tip > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID 89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b > # Parent 7fc86ba705e717a721dbc361bf8c9bc05a18ca2f > 5 > diff --git a/tests/test-keyword.t b/tests/test-keyword.t > --- a/tests/test-keyword.t > +++ b/tests/test-keyword.t > @@ -527,7 +527,7 @@ > $ cat .hg/patches/mqtest.diff > # HG changeset patch > # User User Name <user@example.com> > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad > # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 > cndiff > diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t > --- a/tests/test-patchbomb.t > +++ b/tests/test-patchbomb.t > @@ -26,7 +26,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -97,7 +97,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -125,7 +125,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -257,7 +257,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f > # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f > utf-8 content > @@ -297,21 +297,22 @@ > To: foo > Cc: bar > > - IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgOTA5 > - YTAwZTEzZTlkNzhiNTc1YWVlZTIzZGRkYmFkYTQ2ZDVhMTQzZgojIFBhcmVudCAgZmYyYzlmYTIw > - MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5Zgp1dGYtOCBjb250ZW50CgpkaWZmIC1yIGZm > - MmM5ZmEyMDE4YiAtciA5MDlhMDBlMTNlOWQgZGVzY3JpcHRpb24KLS0tIC9kZXYvbnVsbAlUaHUg > - SmFuIDAxIDAwOjAwOjAwIDE5NzAgKzAwMDAKKysrIGIvZGVzY3JpcHRpb24JVGh1IEphbiAwMSAw > - MDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEsMyBAQAorYSBtdWx0aWxpbmUKKworZGVzY3Jp > - cHRpb24KZGlmZiAtciBmZjJjOWZhMjAxOGIgLXIgOTA5YTAwZTEzZTlkIHV0ZgotLS0gL2Rldi9u > - dWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCArMDAwMAorKysgYi91dGYJVGh1IEphbiAwMSAw > - MDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEsMSBAQAoraMO2bW1hIQo= > + IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIFRodSBKYW4gMDEgMDA6MDA6 > + MDQgMTk3MCArMDAwMAojIE5vZGUgSUQgOTA5YTAwZTEzZTlkNzhiNTc1YWVlZTIzZGRkYmFkYTQ2 > + ZDVhMTQzZgojIFBhcmVudCAgZmYyYzlmYTIwMThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5 > + Zgp1dGYtOCBjb250ZW50CgpkaWZmIC1yIGZmMmM5ZmEyMDE4YiAtciA5MDlhMDBlMTNlOWQgZGVz > + Y3JpcHRpb24KLS0tIC9kZXYvbnVsbAlUaHUgSmFuIDAxIDAwOjAwOjAwIDE5NzAgKzAwMDAKKysr > + IGIvZGVzY3JpcHRpb24JVGh1IEphbiAwMSAwMDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEs > + MyBAQAorYSBtdWx0aWxpbmUKKworZGVzY3JpcHRpb24KZGlmZiAtciBmZjJjOWZhMjAxOGIgLXIg > + OTA5YTAwZTEzZTlkIHV0ZgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr > + MDAwMAorKysgYi91dGYJVGh1IEphbiAwMSAwMDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEs > + MSBAQAoraMO2bW1hIQo= > > > $ python -c 'print open("mbox").read().split("\n\n")[1].decode("base64")' > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f > # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f > utf-8 content > @@ -356,7 +357,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f > long line > @@ -406,7 +407,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f > long line > @@ -464,7 +465,7 @@ > > # HG changeset patch > # User test > - # Date 5 0 > + # Date Thu Jan 01 00:00:05 1970 +0000 > # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 > # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > isolatin 8-bit encoding > @@ -512,7 +513,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -589,7 +590,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -621,7 +622,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -658,7 +659,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -697,7 +698,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f > long line > @@ -770,7 +771,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -804,7 +805,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -838,7 +839,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f > long line > @@ -901,7 +902,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -948,7 +949,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f > long line > @@ -1001,7 +1002,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1020,7 +1021,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1086,7 +1087,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -1129,7 +1130,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -1172,7 +1173,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f > long line > @@ -1240,7 +1241,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1290,7 +1291,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1341,7 +1342,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -1369,7 +1370,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -1403,7 +1404,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1437,7 +1438,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1479,7 +1480,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1535,7 +1536,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -1569,7 +1570,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -1606,7 +1607,7 @@ > > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID 7aead2484924c445ad8ce2613df91f52f9e502ed > # Parent 045ca29b1ea20e4940411e695e20e521f2f0f98e > Added tag two, two.diff for changeset ff2c9fa2018b > @@ -1645,7 +1646,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -1673,7 +1674,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -1727,7 +1728,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -1755,7 +1756,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -1788,7 +1789,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1839,7 +1840,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -1867,7 +1868,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -1900,7 +1901,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -1951,7 +1952,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -1979,7 +1980,7 @@ > > # HG changeset patch > # User test > - # Date 2 0 > + # Date Thu Jan 01 00:00:02 1970 +0000 > # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab > b > @@ -2016,7 +2017,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -2055,7 +2056,7 @@ > > # HG changeset patch > # User test > - # Date 1 0 > + # Date Thu Jan 01 00:00:01 1970 +0000 > # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab > # Parent 0000000000000000000000000000000000000000 > a > @@ -2143,7 +2144,7 @@ > > # HG changeset patch > # User test > - # Date 3 0 > + # Date Thu Jan 01 00:00:03 1970 +0000 > # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > c > @@ -2170,7 +2171,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f > # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f > utf-8 content > @@ -2204,7 +2205,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f > long line > @@ -2247,7 +2248,7 @@ > > # HG changeset patch > # User test > - # Date 5 0 > + # Date Thu Jan 01 00:00:05 1970 +0000 > # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 > # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 > isolatin 8-bit encoding > @@ -2274,7 +2275,7 @@ > > # HG changeset patch > # User test > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433 > # Parent 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 > Added tag zero, zero.foo for changeset 8580ff50825a > @@ -2302,7 +2303,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Branch test > # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > @@ -2337,7 +2338,7 @@ > > # HG changeset patch > # User test > - # Date 4 0 > + # Date Thu Jan 01 00:00:04 1970 +0000 > # Branch test > # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 > # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 > diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t > --- a/tests/test-rebase-collapse.t > +++ b/tests/test-rebase-collapse.t > @@ -568,7 +568,7 @@ > $ hg export tip > # HG changeset patch > # User user1 > - # Date 0 0 > + # Date Thu Jan 01 00:00:00 1970 +0000 > # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213 > # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09 > E > diff --git a/tests/test-rebase-mq.t b/tests/test-rebase-mq.t > --- a/tests/test-rebase-mq.t > +++ b/tests/test-rebase-mq.t > @@ -101,7 +101,7 @@ > $ cat .hg/patches/f.patch > # HG changeset patch > # User test > - # Date ?????????? ? (glob) > + # Date * (glob) > # Node ID ???????????????????????????????????????? (glob) > # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 > P0 > @@ -123,7 +123,7 @@ > $ cat .hg/patches/f2.patch > # HG changeset patch > # User test > - # Date ?????????? ? (glob) > + # Date * (glob) > # Node ID ???????????????????????????????????????? (glob) > # Parent ???????????????????????????????????????? (glob) > P1 > @@ -208,7 +208,7 @@ > $ cat .hg/patches/f_git.patch > # HG changeset patch > # User test > - # Date ?????????? ? (glob) > + # Date * (glob) > # Node ID ???????????????????????????????????????? (glob) > # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 > P0 (git) > @@ -223,7 +223,7 @@ > $ cat .hg/patches/f.patch > # HG changeset patch > # User test > - # Date ?????????? ? (glob) > + # Date * (glob) > # Node ID ???????????????????????????????????????? (glob) > # Parent ???????????????????????????????????????? (glob) > P1 > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel
On 02/10/2013 12:53 PM, Brodie Rao wrote: > On Sat, Feb 9, 2013 at 9:31 AM, Mads Kiilerich <mads@kiilerich.com> wrote: >> # HG changeset patch >> # User Mads Kiilerich <mads@kiilerich.com> >> # Date 1360360457 -3600 >> # Node ID 055060daf58dbe46c667053cbb04409b202ee9cd >> # Parent 97761496c65ae836d6b0983a3f48959dd3112364 >> 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. > Are there any third party utilities that parse these headers? I wonder > if this might cause other tools to break. Yes, that is a valid concern, but we don't expect that. Parsers should read it as Mercurial do, and Mercurial has always been able to handle all formats. So I will put it in 'default' and we can wait and see if it really becomes a problem. /Mads
On Sun, 2013-02-10 at 13:12 +0100, Mads Kiilerich wrote: > On 02/10/2013 12:53 PM, Brodie Rao wrote: > > On Sat, Feb 9, 2013 at 9:31 AM, Mads Kiilerich <mads@kiilerich.com> wrote: > >> # HG changeset patch > >> # User Mads Kiilerich <mads@kiilerich.com> > >> # Date 1360360457 -3600 > >> # Node ID 055060daf58dbe46c667053cbb04409b202ee9cd > >> # Parent 97761496c65ae836d6b0983a3f48959dd3112364 > >> 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. > > Are there any third party utilities that parse these headers? I wonder > > if this might cause other tools to break. > > Yes, that is a valid concern, but we don't expect that. Parsers should > read it as Mercurial do, and Mercurial has always been able to handle > all formats. > > So I will put it in 'default' and we can wait and see if it really > becomes a problem. After a bit of poking, I've discovered this in Git: hg) this=0 for hg in "$@" do this=$(( $this + 1 )) msgnum=$(printf "%0${prec}d" $this) # hg stores changeset metadata in #-commented lines preceding # the commit message and diff(s). The only metadata we care about # are the User and Date (Node ID and Parent are hashes which are # only relevant to the hg repository and thus not useful to us) # Since we cannot guarantee that the commit message is in # git-friendly format, we put no Subject: line and just consume # all of the message as the body LANG=C LC_ALL=C perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 } if ($subject) { print ; } elsif (/^\# User /) { s/\# User/From:/ ; print ; } elsif (/^\# Date /) { my ($hashsign, $str, $time, $tz) = split ; $tz = sprintf "%+05d", (0-$tz)/36; print "Date: " . strftime("%a, %d %b %Y %H:%M:%S ", localtime($time)) . "$tz\n"; } elsif (/^\# /) { next ; } else { print "\n", $_ ; $subject = 1; } ' <"$hg" >"$dotest/$msgnum" || clean_abort so we're going to try something different.
Patch
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -569,7 +569,7 @@ write("# HG changeset patch\n") write("# User %s\n" % ctx.user()) - write("# Date %d %d\n" % ctx.date()) + write("# Date %s\n" % util.datestr(ctx.date())) if branch and branch != 'default': write("# Branch %s\n" % branch) write("# Node ID %s\n" % hex(node)) diff --git a/tests/test-alias.t b/tests/test-alias.t --- a/tests/test-alias.t +++ b/tests/test-alias.t @@ -180,7 +180,7 @@ $ cat 0.diff # HG changeset patch # User test - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID e63c23eaa88ae77967edcf4ea194d31167c478b0 # Parent 0000000000000000000000000000000000000000 foo @@ -224,7 +224,7 @@ 2 $ hg tglog - @ 1:7e7f92de180e: 'bar' + @ 1:c199fc2b9f8e: 'bar' | o 0:e63c23eaa88a: 'foo' @@ -237,15 +237,15 @@ idalias idaliaslong idaliasshell identify import incoming init [255] $ hg id - 7e7f92de180e tip + c199fc2b9f8e tip $ hg ida hg: command 'ida' is ambiguous: idalias idaliaslong idaliasshell [255] $ hg idalias - 7e7f92de180e tip + c199fc2b9f8e tip $ hg idaliasl - 7e7f92de180e tip + c199fc2b9f8e tip $ hg idaliass test $ hg parentsshell diff --git a/tests/test-export.t b/tests/test-export.t --- a/tests/test-export.t +++ b/tests/test-export.t @@ -107,7 +107,7 @@ $ hg export -- -2 # HG changeset patch # User test - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd # Parent 747d3c68f8ec44bb35816bfcd59aeb50b9654c2f foo-10 @@ -153,7 +153,7 @@ $ hg export --color always --nodates tip # HG changeset patch # User test - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID * (glob) # Parent * (glob) !"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ diff --git a/tests/test-graft.t b/tests/test-graft.t --- a/tests/test-graft.t +++ b/tests/test-graft.t @@ -83,7 +83,7 @@ $ hg export tip --git # HG changeset patch # User foo - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82 # Parent 68795b066622ca79a25816a662041d8f78f3cd9e 2 @@ -323,7 +323,7 @@ $ hg export tip --git # HG changeset patch # User bar - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID 64ecd9071ce83c6e62f538d8ce7709d53f32ebf7 # Parent 4bdb9a9d0b84ffee1d30f0dfc7744cade17aa19c 1 @@ -350,7 +350,7 @@ $ hg export tip --git # HG changeset patch # User test - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID 2e80e1351d6ed50302fe1e05f8bd1d4d412b6e11 # Parent e5a51ae854a8bbaaf25cc5c6a57ff46042dadbb4 2 diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t --- a/tests/test-histedit-fold.t +++ b/tests/test-histedit-fold.t @@ -294,7 +294,7 @@ $ hg export tip # HG changeset patch # User test - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID 10c647b2cdd54db0603ecb99b2ff5ce66d5a5323 # Parent 0189ba417d34df9dda55f88b637dcae9917b5964 +4 diff --git a/tests/test-import.t b/tests/test-import.t --- a/tests/test-import.t +++ b/tests/test-import.t @@ -34,7 +34,7 @@ $ hg --cwd b import ../exported-tip.patch applying ../exported-tip.patch -message and committer should be same +message and committer and date should be same $ hg --cwd b tip changeset: 1:1d4bd90af0e4 @@ -852,7 +852,7 @@ $ hg export --git tip # HG changeset patch # User User B - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID eb56ab91903632294ac504838508cb370c0901d2 # Parent 0000000000000000000000000000000000000000 from: tricky! diff --git a/tests/test-issue1175.t b/tests/test-issue1175.t --- a/tests/test-issue1175.t +++ b/tests/test-issue1175.t @@ -43,7 +43,7 @@ $ hg export --git tip # HG changeset patch # User test - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID 89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b # Parent 7fc86ba705e717a721dbc361bf8c9bc05a18ca2f 5 diff --git a/tests/test-keyword.t b/tests/test-keyword.t --- a/tests/test-keyword.t +++ b/tests/test-keyword.t @@ -527,7 +527,7 @@ $ cat .hg/patches/mqtest.diff # HG changeset patch # User User Name <user@example.com> - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9 cndiff diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t --- a/tests/test-patchbomb.t +++ b/tests/test-patchbomb.t @@ -26,7 +26,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -97,7 +97,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -125,7 +125,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -257,7 +257,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f utf-8 content @@ -297,21 +297,22 @@ To: foo Cc: bar - IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgOTA5 - YTAwZTEzZTlkNzhiNTc1YWVlZTIzZGRkYmFkYTQ2ZDVhMTQzZgojIFBhcmVudCAgZmYyYzlmYTIw - MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5Zgp1dGYtOCBjb250ZW50CgpkaWZmIC1yIGZm - MmM5ZmEyMDE4YiAtciA5MDlhMDBlMTNlOWQgZGVzY3JpcHRpb24KLS0tIC9kZXYvbnVsbAlUaHUg - SmFuIDAxIDAwOjAwOjAwIDE5NzAgKzAwMDAKKysrIGIvZGVzY3JpcHRpb24JVGh1IEphbiAwMSAw - MDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEsMyBAQAorYSBtdWx0aWxpbmUKKworZGVzY3Jp - cHRpb24KZGlmZiAtciBmZjJjOWZhMjAxOGIgLXIgOTA5YTAwZTEzZTlkIHV0ZgotLS0gL2Rldi9u - dWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCArMDAwMAorKysgYi91dGYJVGh1IEphbiAwMSAw - MDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEsMSBAQAoraMO2bW1hIQo= + IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIFRodSBKYW4gMDEgMDA6MDA6 + MDQgMTk3MCArMDAwMAojIE5vZGUgSUQgOTA5YTAwZTEzZTlkNzhiNTc1YWVlZTIzZGRkYmFkYTQ2 + ZDVhMTQzZgojIFBhcmVudCAgZmYyYzlmYTIwMThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5 + Zgp1dGYtOCBjb250ZW50CgpkaWZmIC1yIGZmMmM5ZmEyMDE4YiAtciA5MDlhMDBlMTNlOWQgZGVz + Y3JpcHRpb24KLS0tIC9kZXYvbnVsbAlUaHUgSmFuIDAxIDAwOjAwOjAwIDE5NzAgKzAwMDAKKysr + IGIvZGVzY3JpcHRpb24JVGh1IEphbiAwMSAwMDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEs + MyBAQAorYSBtdWx0aWxpbmUKKworZGVzY3JpcHRpb24KZGlmZiAtciBmZjJjOWZhMjAxOGIgLXIg + OTA5YTAwZTEzZTlkIHV0ZgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr + MDAwMAorKysgYi91dGYJVGh1IEphbiAwMSAwMDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEs + MSBAQAoraMO2bW1hIQo= $ python -c 'print open("mbox").read().split("\n\n")[1].decode("base64")' # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f utf-8 content @@ -356,7 +357,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f long line @@ -406,7 +407,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f long line @@ -464,7 +465,7 @@ # HG changeset patch # User test - # Date 5 0 + # Date Thu Jan 01 00:00:05 1970 +0000 # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 isolatin 8-bit encoding @@ -512,7 +513,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -589,7 +590,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -621,7 +622,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -658,7 +659,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -697,7 +698,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f long line @@ -770,7 +771,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -804,7 +805,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -838,7 +839,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f long line @@ -901,7 +902,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -948,7 +949,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f long line @@ -1001,7 +1002,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1020,7 +1021,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1086,7 +1087,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -1129,7 +1130,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -1172,7 +1173,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f long line @@ -1240,7 +1241,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1290,7 +1291,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1341,7 +1342,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -1369,7 +1370,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -1403,7 +1404,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1437,7 +1438,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1479,7 +1480,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1535,7 +1536,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -1569,7 +1570,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -1606,7 +1607,7 @@ # HG changeset patch # User test - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID 7aead2484924c445ad8ce2613df91f52f9e502ed # Parent 045ca29b1ea20e4940411e695e20e521f2f0f98e Added tag two, two.diff for changeset ff2c9fa2018b @@ -1645,7 +1646,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -1673,7 +1674,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -1727,7 +1728,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -1755,7 +1756,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -1788,7 +1789,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1839,7 +1840,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -1867,7 +1868,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -1900,7 +1901,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -1951,7 +1952,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -1979,7 +1980,7 @@ # HG changeset patch # User test - # Date 2 0 + # Date Thu Jan 01 00:00:02 1970 +0000 # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9 # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab b @@ -2016,7 +2017,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -2055,7 +2056,7 @@ # HG changeset patch # User test - # Date 1 0 + # Date Thu Jan 01 00:00:01 1970 +0000 # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab # Parent 0000000000000000000000000000000000000000 a @@ -2143,7 +2144,7 @@ # HG changeset patch # User test - # Date 3 0 + # Date Thu Jan 01 00:00:03 1970 +0000 # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 c @@ -2170,7 +2171,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f utf-8 content @@ -2204,7 +2205,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f long line @@ -2247,7 +2248,7 @@ # HG changeset patch # User test - # Date 5 0 + # Date Thu Jan 01 00:00:05 1970 +0000 # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1 isolatin 8-bit encoding @@ -2274,7 +2275,7 @@ # HG changeset patch # User test - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433 # Parent 240fb913fc1b7ff15ddb9f33e73d82bf5277c720 Added tag zero, zero.foo for changeset 8580ff50825a @@ -2302,7 +2303,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Branch test # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 @@ -2337,7 +2338,7 @@ # HG changeset patch # User test - # Date 4 0 + # Date Thu Jan 01 00:00:04 1970 +0000 # Branch test # Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268 # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9 diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t --- a/tests/test-rebase-collapse.t +++ b/tests/test-rebase-collapse.t @@ -568,7 +568,7 @@ $ hg export tip # HG changeset patch # User user1 - # Date 0 0 + # Date Thu Jan 01 00:00:00 1970 +0000 # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213 # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09 E diff --git a/tests/test-rebase-mq.t b/tests/test-rebase-mq.t --- a/tests/test-rebase-mq.t +++ b/tests/test-rebase-mq.t @@ -101,7 +101,7 @@ $ cat .hg/patches/f.patch # HG changeset patch # User test - # Date ?????????? ? (glob) + # Date * (glob) # Node ID ???????????????????????????????????????? (glob) # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 P0 @@ -123,7 +123,7 @@ $ cat .hg/patches/f2.patch # HG changeset patch # User test - # Date ?????????? ? (glob) + # Date * (glob) # Node ID ???????????????????????????????????????? (glob) # Parent ???????????????????????????????????????? (glob) P1 @@ -208,7 +208,7 @@ $ cat .hg/patches/f_git.patch # HG changeset patch # User test - # Date ?????????? ? (glob) + # Date * (glob) # Node ID ???????????????????????????????????????? (glob) # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 P0 (git) @@ -223,7 +223,7 @@ $ cat .hg/patches/f.patch # HG changeset patch # User test - # Date ?????????? ? (glob) + # Date * (glob) # Node ID ???????????????????????????????????????? (glob) # Parent ???????????????????????????????????????? (glob) P1