diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -222,6 +222,9 @@ def show_changeset(ui, repo, rev=0, chan 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 @@ def show_changeset(ui, repo, rev=0, chan 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) diff --git a/tests/test-basic.out b/tests/test-basic.out --- a/tests/test-basic.out +++ b/tests/test-basic.out @@ -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 diff --git a/tests/test-copy.out b/tests/test-copy.out --- a/tests/test-copy.out +++ b/tests/test-copy.out @@ -4,17 +4,17 @@ b 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 diff --git a/tests/test-flags.out b/tests/test-flags.out --- a/tests/test-flags.out +++ b/tests/test-flags.out @@ -16,29 +16,29 @@ 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: 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 diff --git a/tests/test-rawcommit1.out b/tests/test-rawcommit1.out --- a/tests/test-rawcommit1.out +++ b/tests/test-rawcommit1.out @@ -6,7 +6,7 @@ 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 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 @@ 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 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 @@ 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 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 @@ 54837d97f2932a8194e69745a280a2c11e61ff9c 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 @@ tag: tip 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 @@ 76d5e637cbec1bcc04a5a3fa4bcc7d13f6847c00 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 diff --git a/tests/test-tag.out b/tests/test-tag.out --- a/tests/test-tag.out +++ b/tests/test-tag.out @@ -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! diff --git a/tests/test-undo.out b/tests/test-undo.out --- a/tests/test-undo.out +++ b/tests/test-undo.out @@ -6,7 +6,7 @@ 1 files, 1 changesets, 1 total revisions 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 diff --git a/tests/test-unrelated-pull.out b/tests/test-unrelated-pull.out --- a/tests/test-unrelated-pull.out +++ b/tests/test-unrelated-pull.out @@ -9,11 +9,11 @@ added 1 changesets with 1 changes to 1 f 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 diff --git a/tests/test-up-local-change.out b/tests/test-up-local-change.out --- a/tests/test-up-local-change.out +++ b/tests/test-up-local-change.out @@ -22,13 +22,13 @@ resolving manifests 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 @@ 2 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