Mercurial > hg
changeset 973:a51991ebf229
Deal with non-integer date offsets generated by some tools
author | mpm@selenic.com |
---|---|
date | Sat, 20 Aug 2005 11:59:10 -0700 |
parents | 0bc72d91aeda |
children | 4f81068ed8cd |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Aug 20 01:46:57 2005 -0700 +++ b/mercurial/commands.py Sat Aug 20 11:59:10 2005 -0700 @@ -223,6 +223,11 @@ 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))