[PATCH] convert/bzr: handle Bazaar timestamps correctly (issue1652)
Greg Ward
greg-hg at gerg.ca
Thu May 7 20:39:06 CDT 2009
On Thu, May 7, 2009 at 1:05 PM, Martin Geisler <mg at lazybytes.net> wrote:
> Greg Ward <greg-hg at gerg.ca> writes:
>
>> # HG changeset patch
>> # User Greg Ward <greg-hg at gerg.ca>
>> # Date 1241646483 14400
>> # Node ID 15ff29cd23bfc0ad1113d0be00378abdebb0aa57
>> # Parent b0ce2595777bddf8d4a62119e3a2dfb8ca0078b4
>> convert/bzr: handle Bazaar timestamps correctly (issue1652).
>
> Thanks -- pushed to crew as revision 7a0fcdd3828f.
Thanks!
> I've replaced awk with sed since awk is not the requiredtools list in
> run-test.py, but sed is.
Oops, sorry. But I dislike forcing the bzr timestamps to appear in
timezone +0000: that's fine under run-tests.py, which sets TZ=GMT.
But it could be confusing for someone running the test script
manually: e.g. I just got this:
% compare timestamps
Files bzr-timestamps and hg-timestamps differ
fail: bzr timestamps are:
2009-05-07 21:32 +0000
2009-05-07 21:32 +0000
but hg timestamps are:
2009-05-07 21:32 -0400
2009-05-07 21:32 -0400
Would you entertain one tiny little extra patch more?
# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1241746512 14400
# Node ID 1268b895f69bf149955171316f839ac7d1d28d93
# Parent 2bb6548a8fa6a04f91071932b53b1b969e06a388
test-convert-bzr: tweak sed hack to preserve timezone in 'bzr log' output
diff --git a/tests/test-convert-bzr b/tests/test-convert-bzr
--- a/tests/test-convert-bzr
+++ b/tests/test-convert-bzr
@@ -39,7 +39,7 @@
echo "% compare timestamps"
cd source
bzr log | \
- sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\).\{9\}/\1 +0000/' \
+ sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \
> ../bzr-timestamps
cd ..
More information about the Mercurial-devel
mailing list