comparison mercurial/commands.py @ 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 1f3710636b45
children 4f81068ed8cd
comparison
equal deleted inserted replaced
972:0bc72d91aeda 973:a51991ebf229
221 return 221 return
222 222
223 changes = changelog.read(changenode) 223 changes = changelog.read(changenode)
224 224
225 t, tz = changes[2].split(' ') 225 t, tz = changes[2].split(' ')
226 # a conversion tool was sticking non-integer offsets into repos
227 try:
228 tz = int(tz)
229 except ValueError:
230 tz = 0
226 date = time.asctime(time.localtime(float(t))) + " %+05d" % (int(tz)/-36) 231 date = time.asctime(time.localtime(float(t))) + " %+05d" % (int(tz)/-36)
227 232
228 parents = [(log.rev(p), ui.verbose and hg.hex(p) or hg.short(p)) 233 parents = [(log.rev(p), ui.verbose and hg.hex(p) or hg.short(p))
229 for p in log.parents(node) 234 for p in log.parents(node)
230 if ui.debugflag or p != hg.nullid] 235 if ui.debugflag or p != hg.nullid]