# HG changeset patch # User mpm@selenic.com # Date 2005-08-20 18:59:10 # Node ID a51991ebf22936015e626a32e363861b1b5694be # Parent 0bc72d91aedae896d57afb3b7b1c26b956bfdb65 Deal with non-integer date offsets generated by some tools diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -223,6 +223,11 @@ def show_changeset(ui, repo, rev=0, chan changes = changelog.read(changenode) t, tz = changes[2].split(' ') + # a conversion tool was sticking non-integer offsets into repos + try: + tz = int(tz) + except ValueError: + tz = 0 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))