Mercurial > hg
changeset 967:1f3710636b45
[PATCH] Print timezone offset when outputting dates
Example:
% hg log | head -12
changeset: 791:41440890e57d2dbacde03a2a114e5114a031ea4a
tag: tip
user: Samuel Tardieu <sam@rfc1149.net>
date: Mon Jul 25 13:24:15 2005 +0200
summary: Parse various date formats when accepting user specified dates
[...]
changeset: 787:ba5c2021364ee876dae170e8f153e43bd0b2bd73
parent: 785:31a80e3723cee0a5991340facb2707e71983eb41
user: Bryan O'Sullivan <bos@serpentine.com>
date: Sun Jul 24 00:39:24 2005 -0800
summary: Get "forget" command to use new walk code.
[...]
author | Samuel Tardieu <sam@rfc1149.net> |
---|---|
date | Fri, 19 Aug 2005 23:23:42 -0800 |
parents | 022bcc738389 |
children | 4a9a753e8232 |
files | mercurial/commands.py tests/test-basic.out tests/test-copy.out tests/test-flags.out tests/test-rawcommit1.out tests/test-tag.out tests/test-undo.out tests/test-unrelated-pull.out tests/test-up-local-change.out |
diffstat | 9 files changed, 28 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Aug 19 23:07:31 2005 -0800 +++ b/mercurial/commands.py Fri Aug 19 23:23:42 2005 -0800 @@ -222,6 +222,9 @@ changes = changelog.read(changenode) + t, tz = changes[2].split(' ') + date = time.asctime(time.localtime(float(t))) + " %+05d" % (int(tz)/-36) + parents = [(log.rev(p), ui.verbose and hg.hex(p) or hg.short(p)) for p in log.parents(node) if ui.debugflag or p != hg.nullid] @@ -247,8 +250,7 @@ ui.debug("manifest: %d:%s\n" % (repo.manifest.rev(changes[0]), hg.hex(changes[0]))) ui.status("user: %s\n" % changes[1]) - ui.status("date: %s\n" % time.asctime( - time.localtime(float(changes[2].split(' ')[0])))) + ui.status("date: %s\n" % date) if ui.debugflag: files = repo.changes(changelog.parents(changenode)[0], changenode)
--- a/tests/test-basic.out Fri Aug 19 23:07:31 2005 -0800 +++ b/tests/test-basic.out Fri Aug 19 23:23:42 2005 -0800 @@ -1,7 +1,7 @@ changeset: 0:acb14030fe0a tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: test b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
--- a/tests/test-copy.out Fri Aug 19 23:07:31 2005 -0800 +++ b/tests/test-copy.out Fri Aug 19 23:23:42 2005 -0800 @@ -4,17 +4,17 @@ changeset: 1:3b5b84850bbe tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 2 changeset: 0:c19d34741b0a user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 1 changeset: 0:c19d34741b0a user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 1 566e338d09a089ba737c21e0d3759980 .hg/data/b.d
--- a/tests/test-flags.out Fri Aug 19 23:07:31 2005 -0800 +++ b/tests/test-flags.out Fri Aug 19 23:23:42 2005 -0800 @@ -16,29 +16,29 @@ tag: tip parent: 0:22a449e20da5 user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: chmod +x a changeset: 1:c6ecefc45368 user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: a updated changeset: 2:3ef543305655 tag: tip parent: 0:22a449e20da5 user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: chmod +x a changeset: 1:c6ecefc45368 user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: a updated changeset: 0:22a449e20da5 user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: added a b resolving manifests
--- a/tests/test-rawcommit1.out Fri Aug 19 23:07:31 2005 -0800 +++ b/tests/test-rawcommit1.out Fri Aug 19 23:23:42 2005 -0800 @@ -6,7 +6,7 @@ changeset: 2:9f827976dae4 tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 2 05f9e54f4c9b86b09099803d8b49a50edcb4eaab 644 a @@ -14,7 +14,7 @@ changeset: 3:c8225a106186 tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 3 d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a @@ -22,7 +22,7 @@ changeset: 4:8dfeee82a94b tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 4 05f9e54f4c9b86b09099803d8b49a50edcb4eaab 644 a @@ -30,7 +30,7 @@ 3570202ceac2b52517df64ebd0a062cb0d8fe33a 644 c changeset: 4:8dfeee82a94b user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 4 d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a @@ -40,7 +40,7 @@ parent: 4:8dfeee82a94b parent: 5:a7925a42d0df user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 6 d6e3c4976c13feb1728cd3ac851abaf7256a5c23 644 a @@ -48,6 +48,6 @@ changeset: 7:3a157da4365d tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 7
--- a/tests/test-tag.out Fri Aug 19 23:07:31 2005 -0800 +++ b/tests/test-tag.out Fri Aug 19 23:23:42 2005 -0800 @@ -1,19 +1,19 @@ changeset: 0:acb14030fe0a tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: test changeset: 1:863197ef0378 tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: Added tag bleah for changeset acb14030fe0a21b60322c440ad2d20cf7685a376 changeset: 0:acb14030fe0a tag: bleah user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: test abort: working copy of .hgtags is changed!
--- a/tests/test-undo.out Fri Aug 19 23:07:31 2005 -0800 +++ b/tests/test-undo.out Fri Aug 19 23:23:42 2005 -0800 @@ -6,7 +6,7 @@ changeset: 0:acb14030fe0a tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: test rolling back last transaction
--- a/tests/test-unrelated-pull.out Fri Aug 19 23:07:31 2005 -0800 +++ b/tests/test-unrelated-pull.out Fri Aug 19 23:23:42 2005 -0800 @@ -9,11 +9,11 @@ changeset: 1:9a79c33a9db3 tag: tip user: a -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: a changeset: 0:01f8062b2de5 user: b -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: b
--- a/tests/test-up-local-change.out Fri Aug 19 23:07:31 2005 -0800 +++ b/tests/test-up-local-change.out Fri Aug 19 23:23:42 2005 -0800 @@ -22,13 +22,13 @@ changeset: 1:1e71731e6fbb tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 summary: 2 changeset: 1:1e71731e6fbb5b35fae293120dea6964371c13c6 tag: tip user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 files: a b description: 2 @@ -36,7 +36,7 @@ changeset: 0:c19d34741b0a4ced8e4ba74bb834597d5193851e user: test -date: Thu Jan 1 00:00:00 1970 +date: Thu Jan 1 00:00:00 1970 +0000 files: a description: 1