Mercurial > hg
diff tests/test-convert-bzr @ 8305:7a0fcdd3828f
convert/bzr: handle Bazaar timestamps correctly (issue1652).
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Wed, 06 May 2009 17:48:03 -0400 |
parents | 78658990c725 |
children | 74a1625d11ec |
line wrap: on
line diff
--- a/tests/test-convert-bzr Thu May 07 17:56:57 2009 +0200 +++ b/tests/test-convert-bzr Wed May 06 17:48:03 2009 -0400 @@ -33,6 +33,26 @@ EOF hg convert --filemap filemap source source-filemap-hg hg -R source-filemap-hg manifest -r tip + +# extract timestamps that look just like hg's {date|isodate}: +# yyyy-mm-dd HH:MM zzzz (no seconds!) +echo "% compare timestamps" +cd source +bzr log | \ + awk -F'[ :]' '$1 == "timestamp" { printf "%s %s:%s %s\n", $4, $5, $6, $8 }' \ + > ../bzr-timestamps +cd .. + +hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps +if diff -q bzr-timestamps hg-timestamps ; then + echo "good: hg timestamps match bzr timestamps" +else + echo "fail: bzr timestamps are:" + cat bzr-timestamps + echo "but hg timestamps are:" + cat hg-timestamps +fi + cd .. echo % merge